Topic on Extension talk:FlaggedRevs

164.144.1.7 (talkcontribs)

I am on MW version 1.34 and a, trying to use the 1.31 version of FlaggedRevs. When trying to run the update.php maintenance script I am getting the following error:

PHP Fatal error:  Uncaught Exception: Unable to open file /opt/bitnami/apps/mediawiki/htdocs/extensions/FlaggedRevs/extension.json: filemtime(): stat failed for /opt/bitnami/apps/mediawiki/htdocs/extensions/FlaggedRevs/extension.json in /opt/bitnami/apps/mediawiki/htdocs/includes/registration/ExtensionRegistry.php:136

Stack trace:

#0 /opt/bitnami/apps/mediawiki/htdocs/includes/GlobalFunctions.php(52): ExtensionRegistry->queue('/opt/bitnami/ap...')

#1 /opt/bitnami/apps/mediawiki/htdocs/LocalSettings.php(440): wfLoadExtension('FlaggedRevs')

#2 /opt/bitnami/apps/mediawiki/htdocs/includes/Setup.php(124): require_once('/opt/bitnami/ap...')

#3 /opt/bitnami/apps/mediawiki/htdocs/maintenance/doMaintenance.php(83): require_once('/opt/bitnami/ap...')

#4 /opt/bitnami/apps/mediawiki/htdocs/maintenance/update.php(277): require_once('/opt/bitnami/ap...')

#5 {main}

  thrown in /opt/bitnami/apps/mediawiki/htdocs/includes/registration/ExtensionRegistry.php on line 136


Does anyone know why I am getting this error?


Thank you

Ciencia Al Poder (talkcontribs)

Perhaps the file /opt/bitnami/apps/mediawiki/htdocs/extensions/FlaggedRevs/extension.json does not exist, or the server doesn't have read permissions to open that file

Tacsipacsi (talkcontribs)

You should use

require_once "$IP/extensions/FlaggedRevs/FlaggedRevs.php";

and not

wfLoadExtension('FlaggedRevs')

as the extension documentation instructs you to do.

164.144.1.1 (talkcontribs)

That worked, thank you!

164.144.1.1 (talkcontribs)

Okay one more question, I am getting the following error:

[dd7f92a2ded44d8eb30257a8] /Main_Page Error from line 58 of /opt/bitnami/apps/mediawiki/htdocs/extensions/FlaggedRevs/backend/FRUserActivity.php: Call to undefined method ObjectCache::getMainStashInstance()


From what I can find this may be due to mismatched versions, but I am using the most recent version that I am able from the extension page's download options. Any suggestions on this?

Tacsipacsi (talkcontribs)

Indeed, this method was removed in MediaWiki 1.34, so the FlaggedRevs version for MediaWiki 1.31 could use it with no problem, but it fails on your MW 1.34. You can download FlaggedRevs version for MW 1.34 from GitHub, but I strongly suggest that you update to MediaWiki 1.35 LTS (and FlaggedRevs for MW 1.35), since MediaWiki 1.34 isn’t supported since November 2020. (By the way, this may be the reason why FlaggedRevs for MW 1.34 cannot be downloaded with ExtensionDistributor, while FlaggedRevs for MW 1.35 is available there.)

208.87.237.201 (talkcontribs)

Unfortunately the 1.34 branch is not compatible with Mediawiki 1.34 (not sure why) so it looks like my only option is upgrade MW or not use it.

Reply to "Unable to open file"