Page MenuHomePhabricator

Books rendered without content
Closed, ResolvedPublic

Description

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


Version: unspecified
Severity: major

Details

Reference
bz40900

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:09 AM
bzimport added a project: Collection.
bzimport set Reference to bz40900.
bzimport added a subscriber: Unknown Object (MLST).

artsygeek wrote:

Also applies to Wikipedia:Books on en.wikipedia

Rendering collections is indeed broken and being investigated.

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

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.

ralf_wikimedia wrote:

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...

Ralf: Because of security issues that might outweigh this problem.

volker.haas wrote:

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

Updating priority and severity down slightly. It's not "site down".

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.

I'm going to look into the issue on Wednesday.

(In reply to comment #1)

Also applies to Wikipedia:Books on en.wikipedia

Not happening on cs.wp recently.

(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.

(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.

master + gerrit 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?

ralf_wikimedia wrote:

[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 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

(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...

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...