Last modified: 2013-04-22 16:15:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42900, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40900 - Books rendered without content
Books rendered without content
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Collection (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 40924 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-09 23:00 UTC by snaevar
Modified: 2013-04-22 16:15 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description snaevar 2012-10-09 23:00:28 UTC
When I click to download an PDF book the book is created with headers but no content. This bug applies to en.wikisource.org and is.wikisource.org. I can replicate this bug with any book on those projects.

Bookselves:
Wikisource:Books on en.wikisource
Wikiheimild:Bækur on is.wikisource
Comment 1 artsygeek 2012-10-12 05:54:50 UTC
Also applies to Wikipedia:Books on en.wikipedia
Comment 2 Erik Moeller 2012-10-12 08:23:32 UTC
Rendering collections is indeed broken and being investigated.
Comment 3 Rob Lanphier 2012-10-13 20:12:19 UTC
Reedy made an attempt to fix this through reverting some recent changes.  Reverting has it's own problems, both functionally and likely for security reasons (given the stated motivation behind Ia01c9da5), so this is still broken.  See here for the saga so far:
https://gerrit.wikimedia.org/r/#/q/project:mediawiki/extensions/Collection,n,z
Comment 4 Rob Lanphier 2012-10-13 20:17:03 UTC
Oops, I meant to reference I319d5fcf above, when talking about possible security implications.  The stated reason for that change is "Some text was being escaped and shouldn't have been, now being parsed. In other cases unescaped text was being output."  Perhaps those problems were introduced in Ia01c9da5, though.
Comment 5 Ralf Schmitt 2012-10-13 20:46:29 UTC
why isn't the installed version being reverted to what was deployed before the last update? there should be no need to fiddle with git, it's rather unclear what has been happening in the last 8 commits...
Comment 6 Andre Klapper 2012-10-13 21:34:50 UTC
Ralf: Because of security issues that might outweigh this problem.
Comment 7 Volker Haas 2012-10-15 08:53:18 UTC
*** Bug 40924 has been marked as a duplicate of this bug. ***
Comment 8 Siebrand Mazeland 2012-10-15 19:33:09 UTC
Updating priority and severity down slightly. It's not "site down".
Comment 9 Rob Lanphier 2012-10-16 00:43:00 UTC
Ok, so here's the scoop.  Reverting all of Siebrand's changes in production seems to have fixed things.  The test case that I'm using (which I've seen break) is this one: http://en.wikipedia.org/wiki/Book:1200_AD

Sam has not yet reverted this in master, but has pointed 1.21wmf1 and 1.21wmf2 back to the older version (see Gerrit change #28183 and Gerrit change #28184).  That means that if we try to what's in master right now, it will probably break all over again.
Comment 10 Siebrand Mazeland 2012-10-16 04:57:28 UTC
I'm going to look into the issue on Wednesday.
Comment 11 Juan de Vojníkov 2012-10-16 11:33:16 UTC
(In reply to comment #1)
> Also applies to Wikipedia:Books on en.wikipedia

Not happening on cs.wp recently.
Comment 12 Sam Reed (reedy) 2012-10-16 12:16:08 UTC
(In reply to comment #11)
> (In reply to comment #1)
> > Also applies to Wikipedia:Books on en.wikipedia
> 
> Not happening on cs.wp recently.

See:

(In reply to comment #9)
> Ok, so here's the scoop.  Reverting all of Siebrand's changes in production
> seems to have fixed things.  The test case that I'm using (which I've seen
> break) is this one: http://en.wikipedia.org/wiki/Book:1200_AD
> 
> Sam has not yet reverted this in master, but has pointed 1.21wmf1 and 1.21wmf2
> back to the older version (see Gerrit change #28183 and Gerrit change #28184). 
> That means that if we try to what's in master right now, it will probably break
> all over again.
Comment 13 Siebrand Mazeland 2012-10-17 23:54:02 UTC
(dumping an e-mail reply here)

I've got it working again with
https://gerrit.wikimedia.org/r/#/c/28380/. The breakage only had to do
with an incorrect understanding of the very misunderstood and almost
unused QuickTemplate class. I replaced $this->msg with wfMessage, and
should have replaced with echo wfMessage.

I've found Collection uses a fair bunch of legacy globals, which
translatewiki.net no longer had enabled, which caused JavaScript
breakage. Furthermore, saving books wasn't documented at
Extension:Collection. I added some docs about the two userrights
associated with it. I've successfully downloaded a PDF and I've
successfully previewed a PDF from PediaPress.

Now I'm running into issues trying to re-use saved books. Once I've
test that successfully, I think my patch can be merged. I need help
getting that done.

http://sandbox.translatewiki.net/wiki/Project:Books/SM_Book_Community
has a link "For re-use click here load book". That's the text of
http://sandbox.translatewiki.net/wiki/Template:Saved_book. I had a
look at the template from Dutch language Wikipedia for that, but I
didn't get it to work using the link.

Please help...

P.s. I think PediaPress should keep maintaining Collection actively.
It doesn't do that at the moment, and that leads to it being
maintained through a multi-month effort like mine to bring 150+
extensions back into 2012. If you ensure that you give your extension
a few hours of love every month, you will be able to avoid the --
absolutely unintentional -- breakages too.
Comment 14 Ralf Schmitt 2012-10-18 13:09:53 UTC
see https://github.com/pediapress/Collection/tree/bugzilla-issue-40900 for a fix
Comment 15 Siebrand Mazeland 2012-10-18 13:30:07 UTC
master + Gerrit change #28380 + this one line change doesn't fix it for me.

Question 1: Is this indeed what you proposed as a solution?

As far as I can tell, the book "Project:Books/SM_Book_Community"[1] should be loaded with the URL
http://sandbox.translatewiki.net/w/index.php?title=Special:Book&bookcmd=load_collection&colltitle=Project:Books/SM_Book_Community

Question 2: Should the above URL load a book when everything is working as expected?
Comment 16 Ralf Schmitt 2012-10-18 13:49:26 UTC
[email reply didn't work, or I'm too impatient, sorry for this is being posted twice]
> https://bugzilla.wikimedia.org/show_bug.cgi?id=40900
>
> --- Comment #15 from Siebrand <s.mazeland@xs4all.nl> 2012-10-18 13:30:07 UTC ---
> master + Gerrit change #28380 + this one line change doesn't fix it for me.

which one line change? the branch changes also reverts the getOldId
fix. diffstat says the following:

 Collection.body.php |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

>
> Question 1: Is this indeed what you proposed as a solution?

yes, why do you ask? since it fixes the issue for me and basically just
reverts some changes, I consider this as a solution! However, I actually
only tested loading the book.

> Question 2: Should the above URL load a book when everything is working as
> expected?

yes
Comment 17 Siebrand Mazeland 2012-10-18 14:09:01 UTC
(In reply to comment #16)
> yes, why do you ask?

Because I wanted to be absolutely certain.

> yes

Thanks.

I hope I'll be able to resolve everything later today...
Comment 18 Siebrand Mazeland 2012-10-19 12:36:37 UTC
Gerrit Ibe3bb5a1 patch set 3 should now fix all known breakages that were introduced by the refactoring done in the past weeks. Thanks for everyone's help. Please review and merge...
Comment 19 Siebrand Mazeland 2012-10-29 16:59:35 UTC
Merged.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links