alex4401 / mediawiki-extensions-DataMaps

Interactive data maps extension without extra services needed.
https://mediawiki.org/wiki/Extension:DataMaps
Other
6 stars 5 forks source link

MarkerGroupSpec::__construct() must be an instance of stdClass, null given #83

Closed alex4401 closed 1 year ago

alex4401 commented 1 year ago
[0b11200b251eb5b0d45a0e1f] /wiki/Data:Maps/Exploration/Aberration?action=submit TypeError: Argument 2 passed to MediaWiki\Extension\DataMaps\Data\MarkerGroupSpec::__construct() must be an instance of stdClass, null given, called in /var/www/wiki/extensions/DataMaps/includes/Data/DataMapSpec.php on line 159

Backtrace:

from /var/www/wiki/extensions/DataMaps/includes/Data/MarkerGroupSpec.php(28)
#0 /var/www/wiki/extensions/DataMaps/includes/Data/DataMapSpec.php(159): MediaWiki\Extension\DataMaps\Data\MarkerGroupSpec->__construct()
#1 /var/www/wiki/extensions/DataMaps/includes/Data/DataMapSpec.php(174): MediaWiki\Extension\DataMaps\Data\DataMapSpec->getGroup()
#2 /var/www/wiki/extensions/DataMaps/includes/Rendering/EmbedRenderer.php(141): MediaWiki\Extension\DataMaps\Data\DataMapSpec->iterateGroups()
#3 /var/www/wiki/extensions/DataMaps/includes/Rendering/EmbedRenderer.php(60): MediaWiki\Extension\DataMaps\Rendering\EmbedRenderer->updateLinks()
#4 /var/www/wiki/extensions/DataMaps/includes/Content/DataMapContentHandler.php(119): MediaWiki\Extension\DataMaps\Rendering\EmbedRenderer->prepareOutput()
#5 /var/www/wiki/includes/content/ContentHandler.php(1721): MediaWiki\Extension\DataMaps\Content\DataMapContentHandler->fillParserOutput()
#6 /var/www/wiki/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput()
#7 /var/www/wiki/includes/Revision/RenderedRevision.php(266): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()
#8 /var/www/wiki/includes/Revision/RenderedRevision.php(237): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
#9 /var/www/wiki/includes/Revision/RevisionRenderer.php(221): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
#10 /var/www/wiki/includes/Revision/RevisionRenderer.php(158): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
#11 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()
#12 /var/www/wiki/includes/Revision/RenderedRevision.php(199): call_user_func()
#13 /var/www/wiki/includes/Storage/DerivedPageDataUpdater.php(1430): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#14 /var/www/wiki/extensions/SpamBlacklist/includes/Hooks.php(74): MediaWiki\Storage\DerivedPageDataUpdater->getParserOutputForMetaData()
#15 /var/www/wiki/includes/HookContainer/HookContainer.php(160): MediaWiki\Extension\SpamBlacklist\Hooks->onEditFilterMergedContent()
#16 /var/www/wiki/includes/HookContainer/HookRunner.php(1474): MediaWiki\HookContainer\HookContainer->run()
#17 /var/www/wiki/includes/editpage/Constraint/EditFilterMergedContentHookConstraint.php(106): MediaWiki\HookContainer\HookRunner->onEditFilterMergedContent()
#18 /var/www/wiki/includes/editpage/Constraint/EditConstraintRunner.php(88): MediaWiki\EditPage\Constraint\EditFilterMergedContentHookConstraint->checkConstraint()
#19 /var/www/wiki/includes/EditPage.php(2506): MediaWiki\EditPage\Constraint\EditConstraintRunner->checkConstraints()
#20 /var/www/wiki/includes/EditPage.php(1904): EditPage->internalAttemptSave()
#21 /var/www/wiki/includes/EditPage.php(721): EditPage->attemptSave()
#22 /var/www/wiki/includes/actions/EditAction.php(73): EditPage->edit()
#23 /var/www/wiki/includes/actions/SubmitAction.php(38): EditAction->show()
#24 /var/www/wiki/includes/MediaWiki.php(542): SubmitAction->show()
#25 /var/www/wiki/includes/MediaWiki.php(322): MediaWiki->performAction()
#26 /var/www/wiki/includes/MediaWiki.php(904): MediaWiki->performRequest()
#27 /var/www/wiki/includes/MediaWiki.php(562): MediaWiki->main()
#28 /var/www/wiki/index.php(50): MediaWiki->run()
#29 /var/www/wiki/index.php(46): wfIndexMain()
#30 {main}
alex4401 commented 1 year ago

Happens when a group is missing during save.

alex4401 commented 1 year ago

Seems like when combined with SpamBlacklist even bad validation results in a render. Needs a deeper look.

alex4401 commented 1 year ago

Doesn't seem like there's any error-proof ways to mitigate this. Probably #81 can solve this.