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

Error: Call to undefined method MediaWiki\Page\PageProps::getInstance() #67

Closed
AbdulazizAlwafaee opened this issue Sep 30, 2023 · 3 comments

Comments

@AbdulazizAlwafaee
Copy link

Mediawiki version: 1.40.0
PHP: 8.1.2

Backtrace:

from /var/www/wiki/extensions/SemanticDrilldown/includes/Services.php(115)
#0 /var/www/wiki/extensions/SemanticDrilldown/includes/Services.php(111): SD\Services->getPageProps()
#1 /var/www/wiki/extensions/SemanticDrilldown/includes/Services.php(60): SD\Services->getLoadParameters()
#2 /var/www/wiki/vendor/wikimedia/object-factory/src/ObjectFactory.php(227): SD\Services::getSpecialBrowseData()
#3 /var/www/wiki/vendor/wikimedia/object-factory/src/ObjectFactory.php(149): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec()
#4 /var/www/wiki/includes/specialpage/SpecialPageFactory.php(1326): Wikimedia\ObjectFactory\ObjectFactory->createObject()
#5 /var/www/wiki/includes/specialpage/SpecialPageFactory.php(1361): MediaWiki\SpecialPage\SpecialPageFactory->getPage()
#6 /var/www/wiki/includes/specials/SpecialSpecialpages.php(58): MediaWiki\SpecialPage\SpecialPageFactory->getUsablePages()
#7 /var/www/wiki/includes/specials/SpecialSpecialpages.php(47): SpecialSpecialpages->getPageGroups()
#8 /var/www/wiki/includes/specialpage/SpecialPage.php(701): SpecialSpecialpages->execute()
#9 /var/www/wiki/includes/specialpage/SpecialPageFactory.php(1475): SpecialPage->run()
#10 /var/www/wiki/includes/MediaWiki.php(327): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#11 /var/www/wiki/includes/MediaWiki.php(923): MediaWiki->performRequest()
#12 /var/www/wiki/includes/MediaWiki.php(576): MediaWiki->main()
#13 /var/www/wiki/index.php(50): MediaWiki->run()
#14 /var/www/wiki/index.php(46): wfIndexMain()
#15 {main}

@Seb35
Copy link

Seb35 commented Oct 12, 2023

See #64

@Seb35 Seb35 mentioned this issue Oct 12, 2023
@krabina
Copy link
Contributor

krabina commented Nov 2, 2023

Happens to me as well in MW 1.39, but just as a deprecation notice when running rebuildData.php

PHP Deprecated:  Use of PageProps::getInstance was deprecated in MediaWiki 1.38. [Called from SD\Services::getPageProps in /extensions/SemanticDrilldown/includes/Services.php at line 115] in /includes/debug/MWDebug.php on line 381
PHP Stack trace:
PHP   1. {main}() /extensions/SemanticMediaWiki/maintenance/rebuildData.php:0
PHP   2. require_once() /extensions/SemanticMediaWiki/maintenance/rebuildData.php:294
PHP   3. MediaWiki\Maintenance\MaintenanceRunner->run() /maintenance/doMaintenance.php:85
PHP   4. SMW\Maintenance\rebuildData->execute() /maintenance/includes/MaintenanceRunner.php:309
PHP   5. SMW\Maintenance\DataRebuilder->rebuild() /extensions/SemanticMediaWiki/maintenance/rebuildData.php:198
PHP   6. SMW\Maintenance\DataRebuilder->rebuildAll() /extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php:224
PHP   7. SMW\Maintenance\DataRebuilder->doUpdateById() /extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php:385
PHP   8. SMW\SQLStore\Rebuilder\Rebuilder->rebuild() /extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php:468
PHP   9. SMW\MediaWiki\Jobs\UpdateJob->run() /extensions/SemanticMediaWiki/src/SQLStore/Rebuilder/Rebuilder.php:247
PHP  10. SMW\MediaWiki\Jobs\UpdateJob->doUpdate() /extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php:94
PHP  11. SMW\MediaWiki\Jobs\UpdateJob->parse_content() /extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php:139
PHP  12. SMW\ContentParser->parse() /extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php:199
PHP  13. SMW\ContentParser->fetchFromContent() /extensions/SemanticMediaWiki/includes/ContentParser.php:130
PHP  14. MediaWiki\Content\Renderer\ContentRenderer->getParserOutput() /extensions/SemanticMediaWiki/includes/ContentParser.php:168
PHP  15. WikitextContentHandler->getParserOutput() /includes/content/Renderer/ContentRenderer.php:47
PHP  16. WikitextContentHandler->fillParserOutput() /includes/content/ContentHandler.php:1721
PHP  17. Parser->parse() /includes/content/WikitextContentHandler.php:301
PHP  18. Parser->internalParse() /includes/parser/Parser.php:723
PHP  19. Parser->replaceVariables() /includes/parser/Parser.php:1609
PHP  20. PPFrame_Hash->expand() /includes/parser/Parser.php:2951
PHP  21. Parser->braceSubstitution() /includes/parser/PPFrame_Hash.php:275
PHP  22. Parser->callParserFunction() /includes/parser/Parser.php:3122
PHP  23. SD\Services::SD\{closure:/extensions/SemanticDrilldown/includes/Services.php:51-51}() /includes/parser/Parser.php:3437
PHP  24. SD\ParserFunctions\DrilldownLink->__invoke() /extensions/SemanticDrilldown/includes/Services.php:51
PHP  25. SD\ParserFunctions\DrilldownLink->writeLink() /extensions/SemanticDrilldown/includes/ParserFunctions/DrilldownLink.php:43
PHP  26. MediaWiki\SpecialPage\SpecialPageFactory->getPage() /extensions/SemanticDrilldown/includes/ParserFunctions/DrilldownLink.php:84
PHP  27. Wikimedia\ObjectFactory\ObjectFactory->createObject() /includes/specialpage/SpecialPageFactory.php:1279
PHP  28. Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec() /vendor/wikimedia/object-factory/src/ObjectFactory.php:152
PHP  29. SD\Services::getSpecialBrowseData() /vendor/wikimedia/object-factory/src/ObjectFactory.php:234
PHP  30. SD\Services->getLoadParameters() /extensions/SemanticDrilldown/includes/Services.php:60
PHP  31. SD\Services->getPageProps() /extensions/SemanticDrilldown/includes/Services.php:111
PHP  32. PageProps::getInstance() /extensions/SemanticDrilldown/includes/Services.php:115
PHP  33. wfDeprecated() /includes/PageProps.php:55
PHP  34. MWDebug::deprecated() /includes/GlobalFunctions.php:765
PHP  35. MWDebug::deprecatedMsg() /includes/debug/MWDebug.php:233
PHP  36. MWDebug::sendRawDeprecated() /includes/debug/MWDebug.php:352
PHP  37. trigger_error() /includes/debug/MWDebug.php:381

@gesinn-it-wam
Copy link
Contributor

This has been fixed with ee7a7ce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants