Closed holta closed 2 years ago
@veloman-yunkan @mgautierfr @juuz0 URGENT We really need to fix this bug (if confirmed) before anything else. It seems we have introduced this regression a few days ago.
https://github.com/kiwix/libkiwix/commit/66c40817eed316ea79a2f4f01d8be1e2160b6742 introduced this regression.
The problem is in line 109 of index.js
(libkiwix) where we set href={root}{link}
Since https://github.com/kiwix/libkiwix/commit/66c40817eed316ea79a2f4f01d8be1e2160b6742, OPDS stream provides full URL and we dont need to append {root}. Simply removing it will fix the issue.
This bug does not affect Internet-in-a-Box.
But it's being reported as a service for others, at it suddenly affects all kiwix-tools nightly builds starting with 2022-01-05.
Specifically, kiwix-serve's
-r
flag (same as the--urlRootLocation
flag) adds the specified string into the URL twice, which breaks all links from kiwix-serve's main/welcome page.Example run:
./kiwix-serve -r foobar phet_en_2021-08.zim
Example broken link: http://192.168.0.100/foobar/foobar/phet_en_2021-08
The correct link would (and should!) be: http://192.168.0.100/foobar/phet_en_2021-08
Recap: this worked in all nightly builds up to and including 2022-01-04.
Related:
ASIDE: when run at the command line, kiwix-serve also advertises the wrong URL, failing to add the string specified by
-r
=--urlRootLocation
The correct advertised URL would (and should!) be: http://192.168.0.100:80/foobar