Page MenuHomePhabricator

Collection exports everything to PDF regardless of chosen format (epub, openzim, odt)
Closed, ResolvedPublic


Author: marcin.iwinski

I am trying to export a book as epub however no matter which download format I choose it always servers only pdf file.
Steps to reproduce:

  1. open an article
  2. export/print
  3. create new book
  4. add this page to your book
  5. show book
  6. insert some title
  7. pick e-book (EPUB) from drop down list in "Download" section
  8. After rendering is finished click on "download the file"
  9. a pdf file (instead of a file in epub format) is being downloaded

Same thing happens no matter what format (EPUB/OpenZIM/OpenDocument) i choose.

When I'm hoovering over the download link (from step 8) the underlying url looks as follows:

Best Regards,

Version: master
Severity: major
See Also:



Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 2:29 AM
bzimport added a project: Collection.
bzimport set Reference to bz58151.

marcin.iwinski wrote:

I've reproduced the problem on Google Chrom, Firefox and Safari on MacOS X 10.8. and on Firefox and Chromium on Ubuntu Linux.

uwelk wrote:

Seems to be introduced with,734de04a,n,z

One problem I see is that $writer in RenderingAPI.php is never actully used.

  • Bug 58227 has been marked as a duplicate of this bug. ***

Bug 57975, bug 57920 and bug 58151 are currently investigated by mwalker.

mwalker wrote:

It's not that we don't use $writer anywhere (it get's assigned as an instance variable and then used in the subclass MWServeRenderingAPI.) That being said I'm not sure what's going on. My local instance is apparently broken for other reasons so...

I'm going to in a little bit (2013-12-09T23:00 UTC) git bisect the code running in production to find the offending commit.

mwalker wrote:

*** Bug 57975 has been marked as a duplicate of this bug. ***

info wrote:

Buenas, he visto que también tengo el mismo problema, he probado con varios navegadores, chrome y firefox actualizados a dia 10 diciembre 2013.

mwalker wrote:

So it's definitely that caused it. Now to figure out why...

Change 101062 had a related patch set uploaded by Mwalker:
Revert "Rewrite of interaction with renderer"

Change 101062 merged by MaxSem:
Revert "Rewrite of interaction with renderer"

Change 101108 had a related patch set uploaded by Mwalker:
Change Collection to a deploy branch

mwalker wrote:

So the problem still exists in master; I've just pinned the collection extension to a branch that has a the offending patch reverted. This has now been deployed.

Hi Matt, could you revert this in master as well until you have a fix? It's really not good practice to leave master in a known-broken state. We deploy pretty frequently these days, and this seems like a trap.

mwalker wrote:

I changed the deploy scripts so that new branches pull from my pinned revision. Part of the issue of pulling it from master is that the only platform I have to test on is production (I've not yet had the time to get a beta labs instance setup and for some reason my labs install is completely borked in a different way.)

ralf_wikimedia wrote:

Does that mean you didn't even test this change before it went into production?

mwalker wrote:

Heh; no we tested it :) I tested it locally to ensure that the before / after output to mwlib was the same; and I tested it on my sandbox in labs w/ mwlib with PDF rendering (and our alternate renderer.)

Apparently however the configuration between my local and production is different... And I didn't test multiformat to the same renderer because the code made that seem like it was being exported to a third party render platform (which given that I was able to export to two render platforms it seemed like I'd covered that test case.)

Change 101108 merged by Reedy:
Change Collection to a deploy branch

mwalker: Can this be closed as RESOLVED FIXED, or is work left to do?

mwalker wrote:

Looks like it's working in wmf10 (which is what deployed with it today.) So yes, marking as resolved fixed.