Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zimcheck doesn't account for <base /> #250

Open
rgaudin opened this issue Jul 1, 2021 · 1 comment
Open

Zimcheck doesn't account for <base /> #250

rgaudin opened this issue Jul 1, 2021 · 1 comment

Comments

@rgaudin
Copy link
Member

rgaudin commented Jul 1, 2021

In sotoki, we use the <base /> element to deal properly and cleanly with internal links thorough the ZIM.

Unfortunately, zimcheck doesn't account for this base when checking (internal in this case) links.

So I get tons of errors like

  The following links:
- static/js/webp-hero.bundle.js
(C/users/8672/static/js/webp-hero.bundle.js) were not found in article C/users/8672/gamora

This is because we have a proper base and the link static/js/webp-hero.bunde.js is from the root of the Zim (our base) and not from the context-path of that article.

And this goes on and on on most pages for all the resources listed in the HTML source.

Similarly, we get errors like:

  Found 2 empty links in article: C/users/-1/community

Empty links are valid and in this context points to the base, and thus the root of our Zim.

@rgaudin rgaudin added the bug label Jul 1, 2021
@rgaudin
Copy link
Member Author

rgaudin commented Aug 3, 2021

FYI, we changed our scraper to not use a <base /> because it was easier than fixing zimcheck and it also caused issues with kiwix-js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants