Last modified: 2012-03-02 22:01:04 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 T36083, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34083 - New FileBackend code breaks WebStore extension
New FileBackend code breaks WebStore extension
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Other (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://spiele.j-crew.de/images/thumb/...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-31 07:55 UTC by Thomas Bleher
Modified: 2012-03-02 22:01 UTC (History)
4 users (show)

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


Attachments

Description Thomas Bleher 2012-01-31 07:55:50 UTC
It looks like the new FileBackend code broke the WebStore extension:

A FileRepo object is not set for this File.

Backtrace:

#0 /srv/www/mediawiki/code/includes/filerepo/file/File.php(343): File->assertRepoDefined()
#1 /srv/www/mediawiki/code/includes/filerepo/file/UnregisteredLocalFile.php(122): File->getLocalRefPath()
#2 /srv/www/mediawiki/extensions/PdfHandler/PdfHandler_body.php(165): UnregisteredLocalFile->getMetadata()
#3 /srv/www/mediawiki/extensions/PdfHandler/PdfHandler_body.php(213): PdfHandler->getMetaArray(Object(UnregisteredLocalFile))
#4 /srv/www/mediawiki/code/includes/filerepo/file/UnregisteredLocalFile.php(87): PdfHandler->getPageDimensions(Object(UnregisteredLocalFile), '1')
#5 /srv/www/mediawiki/code/includes/filerepo/file/UnregisteredLocalFile.php(93): UnregisteredLocalFile->cachePageDimensions('1')
#6 /srv/www/mediawiki/extensions/WebStore/inplace-scaler.php(83): UnregisteredLocalFile->getWidth('1')
#7 /srv/www/mediawiki/extensions/WebStore/inplace-scaler.php(134): InplaceScaler->execute()
#8 {main}

This is from http://spiele.j-crew.de/images/thumb/e/e6/9s_pal.pdf/page1-1248px-9s_pal.pdf.jpg. The Wiki runs current trunk (r110351), the WebStore and PdfHandler extension are also current.

It worked before upgrading to the new FileBackend code (last tested with r99290).

I think this should be fixed before releasing 1.19.
Comment 1 Bawolff (Brian Wolff) 2012-02-01 15:16:22 UTC
/me didn't even realize the webstore extension was actually still used for anything.
Comment 2 Aaron Schulz 2012-02-01 17:54:29 UTC
(In reply to comment #1)
> /me didn't even realize the webstore extension was actually still used for
> anything.

It can be plugged into Proofreadpage or PdfHandler. WMF doesn't use it, its status is "unstable", and it's largely an aborted projected.
Comment 3 Thomas Bleher 2012-02-01 19:43:07 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > /me didn't even realize the webstore extension was actually still used for
> > anything.
> 
> It can be plugged into Proofreadpage or PdfHandler. WMF doesn't use it, its
> status is "unstable", and it's largely an aborted projected.

Yeah, I use WebStore as a 404 handler, so ProofreadPage works correctly (IIRC it doesn't register any thumbs, it just fetches them by URL and relies on a working 404 handler for it to work correctly).

I'm open to suggestions what else to use if WebStore is not supported anymore.
My requirement is that it should be usable on a small wiki without too much setup. That probably rules out the Wikimedia setup (BTW: is this documented anywhere? I couldn't see the config files for the scalers on http://noc.wikimedia.org/conf/).

I just tried the setup described in http://www.mediawiki.org/wiki/Manual:Thumb.php#404_Handler , but could not yet get it to work (fails with a 500 error which I have to investigate).
Comment 4 Bawolff (Brian Wolff) 2012-02-01 21:45:12 UTC
I think in 1.19 there is now a thumb_handler.php ( r100535 ) file included by default that you can use, but I don't know much about it.
Comment 5 Thomas Bleher 2012-02-05 15:09:27 UTC
I got thumb_handler.php to work, and have disabled WebStore on my wiki. So for me it would be OK to mark WebStore as broken for v1.19 in the repository and on mediawiki.org, as long as "the new way to do things" is documented there.

BTW: PdfHandler was also broken for me using the new FileBackend code. The following patch makes the extension work again for me. I have extension commit access, but don't have everything set up correctly on my laptop right now, so if anyone wants to commit this small fix, feel free :)

--- a/PdfHandler_body.php
+++ b/PdfHandler_body.php
@@ -103,7 +103,7 @@ class PdfHandler extends ImageHandler {
 
                $width = $params['width'];
                $height = $params['height'];
-               $srcPath = $image->getPath();
+               $srcPath = $image->getLocalRefPath();
                $page = $params['page'];
 
                if ( $page > $this->pageCount( $image ) ) {
Comment 6 Aaron Schulz 2012-02-05 20:31:39 UTC
See r110727.

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


Navigation
Links