Page MenuHomePhabricator

la.wikisource.org export fails "Download failed. The book 'Ad_Alp%C4%93s' could not be found." (due to on-wiki template)
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:

What should have happened instead?:

  • An Ebook (epub) should have been generated

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
Other books export fine. It appears that the presence of a macron in the URL causes this.

Manually correcting the export field in the export tool also works, so the error could be in the LA / IT wiki tool WSExport on Latin WS / Italiian WS original used for link generation.

The letter ē in the book title corresponds with UTF-8 c4 93 and is represented in the submission URL as "%C4%93", if that helps narrow this down at all.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This works for me, so maybe it's a browser thing (?). What browser is that? It's working in Firefox 90.

Hi there, thank you, yes, you are right that the download links in the sidebar work; it is the export top links (above the title) that do not. In Firefox 90, Chrome, Brave and Safari and I get this error in each case, but only via the custom export tool. So the error must lie there somewhere, rather than the export tool itself.

Header tool: https://wsexport.wmflabs.org/tool/book.php?lang=la&format=epub&page=Ad_Alp%25C4%2593s
Left link: https://ws-export.wmcloud.org/?format=epub&lang=la&page=Ad_Alpēs

Strange, Firefox and Chrome both work for me even with the top button, and the link to the advanced form is also correct:

2021-08-09_144846_607x105_screenshot.png (105×607 px, 6 KB)

Can you try it logged out?

Screenshot 2021-08-09 at 17.08.52.png (1×1 px, 220 KB)

Here I am logged out, using top link, using FF 90.

Screenshot 2021-08-09 at 17.10.43.png (1×1 px, 682 KB)

Here I am using Brave (Chrome based), logged out, using top link.

Screenshot 2021-08-09 at 17.13.39.png (1×1 px, 283 KB)

Finaly, here is logged out, using Safari, using top link.

Maybe this is a Mac issue? I should have said on I am using Mac OS with these browsers. I've also noticed the WSExport tool is using a different server URL, not sure if that means anything, and I've contacted the person I think authored the export Template.

@JimKillock we tested this in mac environments and were unable to reproduce. Could you provide more details about your environment?

Thanks for looking into this.

I'm using MacOS 11.4 ; Chrome 92; Safari 11.4, Brave 1.26.77; FF 90. There isn't anything unsual about my install AFAIK.

Can I check you tried using the top links (not the sidebar)?

I can record video if that helps. And let me know if there is any other information I can supply, or anything else you'd like me to try.

It looks like this might be an error in Template:WSExport/Link, which has

{{#if: {{{pagina|}}} | {{urlencode:{{{pagina}}}}} | {{PAGENAMEE}} }}

which is resulting in a URL of

https://wsexport.wmflabs.org/tool/book.php?lang=la&format=epub&page=Ad_Alp%25C4%2593s

i.e. double-encoded.

It doesn't look like the page title is being passed in as pagina, so the issues might be because of the differences between urlencode: and PAGENAMEE.

It can possibly be simplified to {{urlencode:{{{pagina|{{PAGENAME}}}}}}}, which will use the same encoding for both sources of page name.

This doesn't work: {{WSExport/Link|pagina=}}

But this does: {{WSExport/Link|pagina={{PAGENAME}}}}

I sort of think that the best long-term fix for this is T275003 and the addition of a WS Export parser function that'll create the links and icons etc.

Removing CommTech as this is an on-wiki issue (that I'm totally happy to help with, but it's not a team priority).

Oh those links. I was looking at the Blue download link! Sorry for the confusion!

Aklapper renamed this task from LA Wikisource export fails "Download failed. The book 'Ad_Alp%C4%93s' could not be found. " to la.wikisource.org export fails "Download failed. The book 'Ad_Alp%C4%93s' could not be found." (due to on-wiki template).Aug 11 2021, 7:58 PM

@Samwilson Thanks very much, I've contacted the Template author and left a note on it.ws as well as la.ws; hopefully someone will help implement this.

@JimKillock @Samwilson Thanks for reporting and for suggesting a solution. For some reasons the suggested simplification didn't work (no link was generated), but I applied a similar solution using urlencode in both cases instead of PAGENAMEE. Please try it and let me know if you find any other issues.

@Candalua Thanks very much; and also for fixing the problem at la.wikipedia :) I also fixed the problem at en.wikibooks.org, however exports there are still not fuctioning properly as per T269956.

Samwilson claimed this task.

It looks like this is all working now.