Page MenuHomePhabricator

PHP Fatal error: unsupported manifest_version: 2' in /.../w/includes/registration/ExtensionRegistry.php:195
Closed, ResolvedPublic

Description

Setup

  • MediaWiki 1.27.1 (a52d35d)
  • PHP 5.6.27-0+deb8u1 (apache2handler)
  • MariaDB 10.0.28-MariaDB-1~jessie
  • Page Forms 4.0 (65049e9)

Description
When trying to invoke the extension with wfLoadExtension( 'PageForms' ); the wiki fatals with:

Backtrace

PHP Fatal error:  Uncaught exception 'Exception' with message '/.../w/extensions/PageForms/extension.json: unsupported manifest_version: 2' in /../w/includes/registration/ExtensionRegistry.php:195
Stack trace:
#0 /.../w/includes/registration/ExtensionRegistry.php(137): ExtensionRegistry->readFromQueue(Array)
#1 /.../w/includes/Setup.php(39): ExtensionRegistry->loadFromQueue()
#2 /.../w/maintenance/doMaintenance.php(97): require_once('/var/www/htdocs...')
#3 /.../w/maintenance/runJobs.php(127): require_once('/var/www/htdocs...')
#4 {main}
  thrown in /.../w/includes/registration/ExtensionRegistry.php on line 195

My idea was to mitigate by changing the manifest version in the "extension.json" file to 1. This is probably the way to go but then I run into an issue with the Semantic Title extension:

[19fc9ffb5921c178db377c0a] /wiki/Main_Page MWException from line 176 of /.../w/includes/Hooks.php: Invalid callback PFHooks::initProperties in hooks for smwInitProperties

Backtrace*

#0 /.../w/extensions/SemanticMediaWiki/src/PropertyRegistry.php(491): Hooks::run(string)
#1 /.../w/extensions/SemanticMediaWiki/src/PropertyRegistry.php(81): SMW\PropertyRegistry->registerPredefinedProperties(boolean)
#2 /.../w/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_Property.php(468): SMW\PropertyRegistry::getInstance()
#3 /.../w/extensions/SemanticMediaWiki/src/SQLStore/PropertyTableDefinitionBuilder.php(159): SMW\DIProperty::getPredefinedPropertyTypeId(string)
#4 /.../w/extensions/SemanticMediaWiki/src/SQLStore/PropertyTableDefinitionBuilder.php(57): SMW\SQLStore\PropertyTableDefinitionBuilder->addTableDefinitionForFixedProperties(array, string)
#5 /.../w/extensions/SemanticMediaWiki/src/SQLStore/PropertyTableInfoFetcher.php(220): SMW\SQLStore\PropertyTableDefinitionBuilder->doBuild()
#6 /.../w/extensions/SemanticMediaWiki/src/SQLStore/PropertyTableInfoFetcher.php(189): SMW\SQLStore\PropertyTableInfoFetcher->buildDefinitionsForPropertyTables()
#7 /.../w/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(592): SMW\SQLStore\PropertyTableInfoFetcher->getPropertyTableDefinitions()
#8 /.../w/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_Readers.php(81): SMWSQLStore3->getPropertyTables()
#9 /.../w/extensions/SemanticMediaWiki/src/SQLStore/EntityStore/DirectEntityLookup.php(42): SMWSQLStore3Readers->getSemanticData(SMW\DIWikiPage, boolean)
#10 /.../w/extensions/SemanticMediaWiki/src/SQLStore/EntityStore/PersistentCachedEntityLookup.php(110): SMW\SQLStore\EntityStore\DirectEntityLookup->getSemanticData(SMW\DIWikiPage, boolean)
#11 /.../w/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(202): SMW\SQLStore\EntityStore\PersistentCachedEntityLookup->getSemanticData(SMW\DIWikiPage, boolean)
#12 /.../w/extensions/SemanticTitle/SemanticTitle.class.php(413): SMWSQLStore3->getSemanticData(SMW\DIWikiPage)
#13 /.../w/extensions/SemanticTitle/SemanticTitle.class.php(269): SemanticTitle::getSemanticTitle(Title, NULL)
#14 [internal function]: SemanticTitle::onParserBeforeStrip(Parser, string, StripState)
#15 /.../w/includes/Hooks.php(195): call_user_func_array(string, array)
#16 /.../w/includes/parser/Parser.php(653): Hooks::run(string, array)
#17 /.../w/includes/parser/Parser.php(5101): Parser->preprocess(string, Title, ParserOptions)
#18 /.../w/includes/cache/MessageCache.php(1036): Parser->transformMsg(string, ParserOptions, Title)
#19 /.../w/includes/Message.php(1162): MessageCache->transform(string, boolean, Language, Title)
#20 /.../w/includes/Message.php(829): Message->transformText(string)
#21 /.../w/includes/Message.php(892): Message->toString()
#22 /.../w/includes/OutputPage.php(927): Message->text()
#23 /.../w/includes/OutputPage.php(975): OutputPage->setHTMLTitle(Message)
#24 /.../w/includes/page/Article.php(504): OutputPage->setPageTitle(string)
#25 /.../w/includes/actions/ViewAction.php(44): Article->view()
#26 /.../w/includes/MediaWiki.php(503): ViewAction->show()
#27 /.../w/includes/MediaWiki.php(288): MediaWiki->performAction(Article, Title)
#28 /.../w/includes/MediaWiki.php(745): MediaWiki->performRequest()
#29 /.../w/includes/MediaWiki.php(519): MediaWiki->main()
#30 /.../w/index.php(43): MediaWiki->run()
#31 {main}

Thus also pinging @cicalese

Event Timeline

Kghbln created this task.Nov 1 2016, 9:29 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 1 2016, 9:29 PM

Oops! I have no idea what "manifest version" is, but that smwInitProperties call definitely shouldn't be there - I just removed it from extension.json.

Kghbln added a comment.EditedNov 1 2016, 10:42 PM

I just removed it from extension.json.

I have done so manually too and as well changed the manifest version to 1 (very last line of the "extension.json" file) and then everything is great, meaning I can use wfLoadExtension( 'PageForms' ); without issues.

I ran into the manifest issue with another extension so from field experience ...

Kghbln updated the task description. (Show Details)Nov 1 2016, 10:44 PM

That's great to hear! And thanks for the detective work.

I'll try to "re-release" version 4.0... although I think this bug only affects people using MW 1.28, which is hopefully a small number.

No, never mind - it affects anyone who uses wfLoadExtension().

Paladox added a subscriber: Paladox.

Hi @Kghbln , we doint support extension.json on mw 1.27 or lower since manifest_version 2 is only supported in mw 1.28+. Please could you use the old php entry point.

No, never mind - it affects anyone who uses wfLoadExtension().

Affirmative. That's why I was fast in reporting to give you the chance to delete the tag and re-add it to the amended commit. I think right now only a small number of wikis are using the new loading mechanism.

Kghbln added a comment.EditedNov 1 2016, 11:04 PM

@Paladox extension.json is around since MW 1.25 and if just changing the manifest version causes fatals for versions lower than MW 1.28 when I think something is inherently broken with it. It just feels so wrong.

Reedy added a subscriber: Reedy.Nov 1 2016, 11:06 PM

@Paladox extension.json is around since MW 1.25 and if just changing the manifest version causes fatals for versions lower than MW 1.28 when I think something is inherently broken with it. It just feels so wrong.

Newer manifest versions aren't backwards compatible. It's designed with versioning for this reason.

Age old argument that you shouldn't generally be using master extension with non master MW etc... Match the code branches

Age old argument that you shouldn't generally be using master extension with non master MW etc... Match the code branches

We are not talking about a WMF extension here. I actually was using a tagged version meant to be compatible with MW 1.21 to MW 1.27. So back to manifest version 1 to gain compat for this range of supported MW versions.

manifest_version is now back to 1, and PF 4.0 has been "re-released", so hopefully everything works now...

Kghbln closed this task as Resolved.Nov 1 2016, 11:28 PM
Kghbln claimed this task.

so hopefully everything works now...

Affirmative. Thanks!

Kghbln reassigned this task from Kghbln to Yaron_Koren.Nov 1 2016, 11:29 PM