starcitizenwiki / mediawiki-extensions-picturehtmlsupport Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v2.0
License: GNU General Public License v2.0
Trying WebP v2 on MW 1.39 + PHP 8.1.27 and ImageMagik with webp support:
convert --version
Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5)
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
get's a TypeError after replacing /var/www/html/includes/media/ThumbnailImage.php
with /var/www/html/extensions/PictureHtmlSupport/includes/ThumbnailImage.php
:
[6af1e879fe81d8b8ea5d8bf3] /index.php/User:Alex TypeError: explode(): Argument #2 ($string) must be of type string, bool given
Backtrace:
from /var/www/html/extensions/WebP/includes/Hooks/ThumbnailHooks.php(131)
#0 /var/www/html/extensions/WebP/includes/Hooks/ThumbnailHooks.php(131): explode()
#1 /var/www/html/includes/HookContainer/HookContainer.php(160): MediaWiki\Extension\WebP\Hooks\ThumbnailHooks->onPictureHtmlSupportBeforeProduceHtml()
#2 /var/www/html/includes/media/ThumbnailImage.php(214): MediaWiki\HookContainer\HookContainer->run()
#3 /var/www/html/includes/Linker.php(792): ThumbnailImage->toHtml()
#4 /var/www/html/includes/Linker.php(425): Linker::makeThumbLink2()
#5 /var/www/html/includes/parser/Parser.php(5550): Linker::makeImageLink()
#6 /var/www/html/includes/parser/Parser.php(2712): Parser->makeImage()
#7 /var/www/html/includes/parser/Parser.php(2456): Parser->handleInternalLinks2()
#8 /var/www/html/includes/parser/Parser.php(1638): Parser->handleInternalLinks()
#9 /var/www/html/includes/parser/Parser.php(723): Parser->internalParse()
#10 /var/www/html/includes/content/WikitextContentHandler.php(301): Parser->parse()
#11 /var/www/html/includes/content/ContentHandler.php(1721): WikitextContentHandler->fillParserOutput()
#12 /var/www/html/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput()
#13 /var/www/html/includes/Revision/RenderedRevision.php(266): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()
#14 /var/www/html/includes/Revision/RenderedRevision.php(237): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
#15 /var/www/html/includes/Revision/RevisionRenderer.php(221): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
#16 /var/www/html/includes/Revision/RevisionRenderer.php(158): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
#17 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()
#18 /var/www/html/includes/Revision/RenderedRevision.php(199): call_user_func()
#19 /var/www/html/includes/poolcounter/PoolWorkArticleView.php(91): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#20 /var/www/html/includes/poolcounter/PoolWorkArticleViewCurrent.php(97): PoolWorkArticleView->renderRevision()
#21 /var/www/html/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleViewCurrent->doWork()
#22 /var/www/html/includes/page/ParserOutputAccess.php(299): PoolCounterWork->execute()
#23 /var/www/html/includes/page/Article.php(714): MediaWiki\Page\ParserOutputAccess->getParserOutput()
#24 /var/www/html/includes/page/Article.php(528): Article->generateContentOutput()
#25 /var/www/html/includes/actions/ViewAction.php(78): Article->view()
#26 /var/www/html/includes/MediaWiki.php(542): ViewAction->show()
#27 /var/www/html/includes/MediaWiki.php(322): MediaWiki->performAction()
#28 /var/www/html/includes/MediaWiki.php(904): MediaWiki->performRequest()
#29 /var/www/html/includes/MediaWiki.php(562): MediaWiki->main()
#30 /var/www/html/index.php(50): MediaWiki->run()
#31 /var/www/html/index.php(46): wfIndexMain()
#32 {main}
Line 131 on extensions/WebP/includes/Hooks/ThumbnailHooks.php is: related to the thumbnail:
$filePath = explode( $hash, $thumbnail->getStoragePath() );
Any clue?
If ThumbnailHooks.php
is not replaced the webp images are created in ./images/webp/
path but they aren't served when a wiki page displays an image, for example with:
[[File:test_file.jpg|300px|thumb|It should be a webp image]]
<source>
in <picture>
wgParserEnableLegacyMediaDOM = false;
HTML ref:
Related task:
<picture>
, <source>
: https://phabricator.wikimedia.org/T25932A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.