[Bug 26548] External wiki generates incorrect thumbnails of PDF files from Wikimedia Commons
https://bugzilla.wikimedia.org/show_bug.cgi?id=26548 Krinkle krinklem...@gmail.com changed: What|Removed |Added CC|krinklem...@gmail.com | AssignedTo|roan.katt...@gmail.com |wikibugs-l@lists.wikimedia. ||org -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 26548] External wiki generates incorrect thumbnails of PDF files from Wikimedia Commons
https://bugzilla.wikimedia.org/show_bug.cgi?id=26548 Bawolff bawolff...@gmail.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Comment #9 from Bawolff bawolff...@gmail.com 2011-02-05 08:51:16 UTC --- I discovered that there exists a validateParam method of the media handler's to validate parameters, which made me feel a whole lot better about this patch. Committed in r81558. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 26548] External wiki generates incorrect thumbnails of PDF files from Wikimedia Commons
https://bugzilla.wikimedia.org/show_bug.cgi?id=26548 --- Comment #8 from Bawolff bawolff...@gmail.com 2011-01-30 04:24:52 UTC --- Created attachment 8065 -- https://bugzilla.wikimedia.org/attachment.cgi?id=8065 possible patch to make instantcommons work with paged media Here's a first version of a patch to make this work. The basic issue is: *When transforming a file into a thumbnail, there are several parameters. The most basic are width and height. Paged media (like pdf's) also use a page parameter. Media handlers can define whatever parameters are useful to them (for example, oggHandler uses a seek parameter to determine which frame in a video stream to use as a thumbnail). *The API only supports making thumbnails with the width and height parameters. No other parameters are supported. *ForeignApiFile throws away any other rendering parameters that aren't width or height. This patch fixes that by adding a new parameter to the api - iiurlparam. This should fix the issue. However there's a couple things I'm not sure about (which is why this is attached to the bug instead of committed). *The syntax for specifying rendering parameters to the api is api.php?titles=file:your_image.pdfaction=queryquery=imageinfoprop=urliiurlwidth=200iiurlparam=page=3|some_other_parameter=bar Basically, iiurlparam takes a | separated list of name=value pairs. Having name=value inside an api parameter is a little different from how the rest of the api works. However we can't just have iiurlparam name here because the parameters could be anything. Although we could just have iiurlpage since that is really the only one causing the issues at the mto be consistentoment, but that seems kind of half-hearted. *Does allowing arbitrary rendering parameters introduce any security issues? I'm pretty sure it does not, since I believe they are validated before used, however not 100% sure how the image rendering code actually works. Just from giving useful error messages, the parameters should probably be validated inside ApiQueryImageInfo better then what I've done (as it stands, if something is really invalid, it should cause a mediatransformerror, which seems to just cause the api not to output a thumb parameter, with no warnings/errors. Maybe pass through the image handler's normaliseParams before trying to use, and error out if that returns false). *A minor issue. I'm not sure what the deal is with the error codes in this module. http://en.wikipedia.org/w/api.php?action=queryprop=imageinfotitles=image:Example.jpgiiprop=urliiurlheight=10format=xml has a couple too many i's. So do the new error codes I introduced (to be consistent, since i'm not really sure what the conventions with api error codes actually are). So anyways, thoughts? -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 26548] External wiki generates incorrect thumbnails of PDF files from Wikimedia Commons
https://bugzilla.wikimedia.org/show_bug.cgi?id=26548 Mark A. Hershberger m...@everybody.org changed: What|Removed |Added Status|NEW |ASSIGNED CC||m...@everybody.org AssignedTo|wikibugs-l@lists.wikimedia. |roan.katt...@gmail.com |org | --- Comment #2 from Mark A. Hershberger m...@everybody.org 2011-01-28 19:55:49 UTC --- Giving this to Roan so it doesn't fall through the cracks and since he seems to have an idea about it. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 26548] External wiki generates incorrect thumbnails of PDF files from Wikimedia Commons
https://bugzilla.wikimedia.org/show_bug.cgi?id=26548 Krinkle krinklem...@gmail.com changed: What|Removed |Added CC||krinklem...@gmail.com --- Comment #3 from Krinkle krinklem...@gmail.com 2011-01-28 22:48:53 UTC --- Within WIkimedia wikis this works fine: http://en.wikisource.org/w/index.php?title=File:Apuntes_Electronica_Transistores.pdfpage=2 So it 'can' work and the solution has apparently been found. But then again, WMF doesn't have the typical InstantCommons / API ForeignRepo config. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 26548] External wiki generates incorrect thumbnails of PDF files from Wikimedia Commons
https://bugzilla.wikimedia.org/show_bug.cgi?id=26548 Leinad danny.lei...@gmail.com changed: What|Removed |Added CC||danny.lei...@gmail.com --- Comment #4 from Leinad danny.lei...@gmail.com 2011-01-28 22:59:14 UTC --- (In reply to comment #3) Within WIkimedia wikis this works fine: http://en.wikisource.org/w/index.php?title=File:Apuntes_Electronica_Transistores.pdfpage=2 So it 'can' work and the solution has apparently been found. But then again, WMF doesn't have the typical InstantCommons / API ForeignRepo config. Wikimedia sister projects use thumbnails from Commons. Wikis with InstantCommons generate own thumbnails. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 26548] External wiki generates incorrect thumbnails of PDF files from Wikimedia Commons
https://bugzilla.wikimedia.org/show_bug.cgi?id=26548 --- Comment #5 from Krinkle krinklem...@gmail.com 2011-01-28 23:02:10 UTC --- (In reply to comment #4) (In reply to comment #3) Within WIkimedia wikis this works fine: http://en.wikisource.org/w/index.php?title=File:Apuntes_Electronica_Transistores.pdfpage=2 So it 'can' work and the solution has apparently been found. But then again, WMF doesn't have the typical InstantCommons / API ForeignRepo config. Wikimedia sister projects use thumbnails from Commons. Wikis with InstantCommons generate own thumbnails. Caching can be disabled when using wikimediacommons as a foreign file repo. Then the thumbnails are used directly from Commons. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 26548] External wiki generates incorrect thumbnails of PDF files from Wikimedia Commons
https://bugzilla.wikimedia.org/show_bug.cgi?id=26548 --- Comment #6 from Bawolff bawolff...@gmail.com 2011-01-28 23:03:03 UTC --- (In reply to comment #4) (In reply to comment #3) Within WIkimedia wikis this works fine: http://en.wikisource.org/w/index.php?title=File:Apuntes_Electronica_Transistores.pdfpage=2 So it 'can' work and the solution has apparently been found. But then again, WMF doesn't have the typical InstantCommons / API ForeignRepo config. Wikimedia sister projects use thumbnails from Commons. Wikis with InstantCommons generate own thumbnails. No. Wiki's with instantCommons get their thumbnails from commons too (either directly, or they are downloaded from commons, and then cached). But they do it in a different way. The problem is, at the moment the api only supports passing the height and width parameter for getting the thumb url. ForeignApiRepo throws away any other rendering parameters (which includes page number). -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 26548] External wiki generates incorrect thumbnails of PDF files from Wikimedia Commons
https://bugzilla.wikimedia.org/show_bug.cgi?id=26548 --- Comment #7 from Krinkle krinklem...@gmail.com 2011-01-28 23:06:11 UTC --- According to bawolff, on IRC, when using ForeignDBRepo (rather than ForeignApiRepo, such as on WMF): Yeah, ForeignDBRepo is fine the getThumbUrl function of ForiegnApiRepo doesn't even take an argument for pages as far as i can tell it appears that technically we support passing handler-specific rendering parameters that could be anything I guess these parameters could be added to ForeignApiRepo like in ForeignDBRepo fairly easily. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 26548] External wiki generates incorrect thumbnails of PDF files from Wikimedia Commons
https://bugzilla.wikimedia.org/show_bug.cgi?id=26548 Roan Kattouw roan.katt...@gmail.com changed: What|Removed |Added CC||roan.katt...@gmail.com --- Comment #1 from Roan Kattouw roan.katt...@gmail.com 2011-01-02 21:22:02 UTC --- This sounds like an issue with the way ForeignAPIRepo and PdfHandler work together, but I can't tell offhand which one is to blame. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 26548] External wiki generates incorrect thumbnails of PDF files from Wikimedia Commons
https://bugzilla.wikimedia.org/show_bug.cgi?id=26548 Reedy s...@reedyboy.net changed: What|Removed |Added Severity|enhancement |normal -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l