Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Return value of CoreTagHooks::gallery() must be of the type string, array returned #5641

Open
kghbln opened this issue May 19, 2024 · 0 comments
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error

Comments

@kghbln
Copy link
Member

kghbln commented May 19, 2024

Setup

  • MediaWiki | 1.39.7 (64425c7)16:12, 15 May 2024
  • PHP | 7.4.33 (apache2handler)
  • MariaDB | 10.5.23-MariaDB-0+deb11u1
  • Elasticsearch | 7.10.2
  • Semantic MediaWiki 4.1.3

Issue

Happening on https://sandbox.semantic-mediawiki.net/

Then running php extensions/SemanticMediaWiki/maintenance/rebuildData.php -v --ignore-exceptions --with-maintenance-log:

updating 2953      [T: BootstrapComponents/Well]
[9e4520696d2e1dab9704b1ef] [no req]   TypeError: Return value of CoreTagHooks::gallery() must be of the type string, array returned

or

   ... updating 22741     [S: BootstrapComponents/Well]
[35da4ada9997a1bf9a957bbe] [no req]   TypeError: Return value of CoreTagHooks::gallery() must be of the type string, array returned

Backtrace:

from /../w/includes/parser/CoreTagHooks.php(177)
#0 /../w/includes/parser/Parser.php(4019): CoreTagHooks::gallery()
#1 /../w/includes/parser/PPFrame_Hash.php(353): Parser->extensionSubstitution()
#2 /../w/includes/parser/Parser.php(2953): PPFrame_Hash->expand()
#3 /../w/includes/parser/Parser.php(1609): Parser->replaceVariables()
#4 /../w/includes/parser/Parser.php(723): Parser->internalParse()
#5 /../w/includes/content/WikitextContentHandler.php(301): Parser->parse()
#6 /../w/includes/content/ContentHandler.php(1721): WikitextContentHandler->fillParserOutput()
#7 /../w/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput()
#8 /../w/extensions/SemanticMediaWiki/includes/ContentParser.php(168): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()
#9 /../w/extensions/SemanticMediaWiki/includes/ContentParser.php(130): SMW\ContentParser->fetchFromContent()
#10 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(199): SMW\ContentParser->parse()
#11 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(139): SMW\MediaWiki\Jobs\UpdateJob->parse_content()
#12 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(94): SMW\MediaWiki\Jobs\UpdateJob->doUpdate()
#13 /../w/extensions/SemanticMediaWiki/src/SQLStore/Rebuilder/Rebuilder.php(247): SMW\MediaWiki\Jobs\UpdateJob->run()
#14 /../w/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(472): SMW\SQLStore\Rebuilder\Rebuilder->rebuild()
#15 /../w/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(385): SMW\Maintenance\DataRebuilder->doUpdateById()
#16 /../w/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(224): SMW\Maintenance\DataRebuilder->rebuildAll()
#17 /../w/extensions/SemanticMediaWiki/maintenance/rebuildData.php(198): SMW\Maintenance\DataRebuilder->rebuild()
#18 /../w/maintenance/includes/MaintenanceRunner.php(309): SMW\Maintenance\rebuildData->execute()
#19 /../w/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run()
#20 /../w/extensions/SemanticMediaWiki/maintenance/rebuildData.php(294): require_once(string)
#21 {main}

The --ignore-exceptions' flag to "rebuildData.php" was not working, so I had to restart rebuilding data manually with the -s` flag.

@kghbln kghbln added the bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error
Projects
None yet
Development

No branches or pull requests

1 participant