FS#48427 - [arch-wiki-docs] Redirects to sections of another article break resulting html

Attached to Project: Community Packages
Opened by Ingo Albrecht (indigo) - Thursday, 03 March 2016, 10:45 GMT
Last edited by Sergej Pupykin (sergej) - Tuesday, 08 March 2016, 15:00 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

The ArchWiki uses redirects for a number of reasons.
These redirects include editorial redirects to sections of another article. The reasons for using them are described in the top post of [1]. Most commonly used examples are [2] and [3].

Unfortunately, redirects like [2] and [3] require JavaScript enablement in the browser. Moreover, they break when converted to simple, standard conforming HTML for the package arch-wiki-docs.

As a consequence, the package does not conform to the GNU FDL under which it is published.[4]

Additional info:
[1] https://wiki.archlinux.org/index.php/Help_talk:Style#Links_to_redirects
[2] https://wiki.archlinux.org/index.php?title=Install&redirect=no
[3] https://wiki.archlinux.org/index.php?title=Start&redirect=no
[4] https://www.gnu.org/software/toutdoux/doc/user/fr/x522.html
[5] file:///usr/share/doc/arch-wiki/html/en/AIDE.html#Installation

Steps to reproduce:

Install the package, open [5] with your favourite browser (JS enabled or not) and click on the "Install" link.
This task depends upon

Closed by  Sergej Pupykin (sergej)
Tuesday, 08 March 2016, 15:00 GMT
Reason for closing:  Fixed
Comment by Jakub Klinkovský (lahwaacz) - Thursday, 03 March 2016, 14:12 GMT
Should be fixed in https://github.com/lahwaacz/arch-wiki-docs/commit/d76535d77f335442e886e6def609a372650ba9af
I would appreciate if somebody could test the script locally before the package is updated, otherwise it might get stuck on broken version for several months...
Comment by Ingo Albrecht (indigo) - Thursday, 03 March 2016, 19:44 GMT
Hi, thanks. It does not work yet, the URL gets for the Install link gets resolved, but contains spaces instead of underscores:
file:///usr/share/doc/arch-wiki/html/en/Help:Reading.html#Installation%20of%20packages
versus
file:///usr/share/doc/arch-wiki/html/en/Help:Reading.html#Installation_of_packages
Comment by Jakub Klinkovský (lahwaacz) - Thursday, 03 March 2016, 19:56 GMT
Please test the following commit: https://github.com/lahwaacz/arch-wiki-docs/commit/7abcbe5a3f152f7042e36875eb48f3f507b694cf
It does not solve dot-encoding of special characters yet, but should cover most common cases. Soon I will probably rewrite the script to use wiki-scripts as the interface to the API, which will solve this issue.
Comment by Ingo Albrecht (indigo) - Friday, 04 March 2016, 11:07 GMT
Now the links in
file:///usr/share/doc/arch-wiki/html/en/Help%3AReading.html#Installation_of_packages
work, but the "start" links in the next section
file:///usr/share/doc/arch-wiki/html/en/Help%3AReading.html#Control_of_systemd_units
not (again, missing underscore).

Special characters: yes ok, can't all be in this report. If I can be any help when you tackle rewrite, give me a ping.
English first: subpages navigate well; also the templates conversion works pretty good. To improve those (just noting as a reminder): they all start with the two template icons from left/right at the beginning. They would look neater if the second template icon wraps to where the template closes with }}.
Comment by Jakub Klinkovský (lahwaacz) - Friday, 04 March 2016, 13:07 GMT
There could be a problem with "partial upgrade", because the script checks only the modification time of the html file, last update of the wiki page and an artificial epoch (which does not work reliably, or at all). The script can't update pages that were already downloaded, but badly processed, so I bumped the epoch (to 2016-03-03 18:00:00 (UTC)). It is possible that at that time you were still working with the old script, so the update might have skipped some files. For testing you can force an update of specific files by simply deleting them before running the script (e.g. you can delete only the en/ subdirectory).

As for the templates, there is actually no conversion, only a few stylesheets are missing: https://github.com/lahwaacz/arch-wiki-docs/issues/12
Comment by Ingo Albrecht (indigo) - Friday, 04 March 2016, 21:27 GMT
Yes, you are right. ctime of Help%3AReading.html was 2016-03.03 19:19 UTC
Great, it works, even the stylesheet containing the templates. Many thanks!

Totally GNU again.

(removed http://www.gnu.org/graphics/gnu-ascii.de.html flyspray's css not fit for it:)
Comment by Jakub Klinkovský (lahwaacz) - Saturday, 05 March 2016, 10:37 GMT
Great to hear that! So now it's just a matter of simply updating the package...

Loading...