Hide Forgot
Description of problem: After Fedora 24 -> 25 dnf system-upgrade, no stylesheets are loading in mediawiki-1.27.1-1. The wiki has no 3rd party addons installed and the LocalSettings.php was re-generated to verify no legacy settings were left over from past versions. With $wgShowExceptionDetails = true; in LocalSettings.php, the error message is: Exception encountered, of type "Error" [WDar9kcgRu-hAeDjJSGbQgAAAAQ] /mediawiki/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.sectionAnchor%7Cmediawiki.skinning.interface%7Cskins.vector.styles&only=styles&skin=vector Error from line 478 of /usr/share/mediawiki/includes/resourceloader/ResourceLoaderModule.php: Call to undefined function RelPath\getRelativePath() Backtrace: #0 [internal function]: ResourceLoaderModule::{closure}(string) #1 /usr/share/mediawiki/includes/resourceloader/ResourceLoaderModule.php(479): array_map(Closure, array) #2 /usr/share/mediawiki/includes/resourceloader/ResourceLoaderModule.php(452): ResourceLoaderModule::getRelativePaths(array) #3 /usr/share/mediawiki/includes/resourceloader/ResourceLoaderFileModule.php(393): ResourceLoaderModule->saveFileDependencies(ResourceLoaderContext, array) #4 /usr/share/mediawiki/includes/resourceloader/ResourceLoaderModule.php(609): ResourceLoaderFileModule->getStyles(ResourceLoaderContext) #5 /usr/share/mediawiki/includes/resourceloader/ResourceLoaderModule.php(556): ResourceLoaderModule->buildContent(ResourceLoaderContext) #6 /usr/share/mediawiki/includes/resourceloader/ResourceLoader.php(973): ResourceLoaderModule->getModuleContent(ResourceLoaderContext) #7 /usr/share/mediawiki/includes/resourceloader/ResourceLoader.php(702): ResourceLoader->makeModuleResponse(ResourceLoaderContext, array, array) #8 /usr/share/mediawiki/load.php(47): ResourceLoader->respond(ResourceLoaderContext) #9 {main} No SELinux errors are reported. Additional info: During the system upgrade, the mediawiki database was not properly updated. From the /var/log/mediawiki-updates.log: PHP Warning: PHP Startup: bcmath: Unable to initialize module Module compiled with module API=20131226 PHP compiled with module API=20151012 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/gmp.so' - /usr/lib64/php/modules/gmp.so: undefined symbol: zval_used_for_init in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/intl.so' - /usr/lib64/php/modules/intl.so: undefined symbol: zval_used_for_init in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/tidy.so' - /usr/lib64/php/modules/tidy.so: undefined symbol: zval_used_for_init in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so' - /usr/lib64/php/modules/mysql.so: undefined symbol: _zend_list_find in Unknown on line 0 PHP Warning: Module 'json' already loaded in Unknown on line 0 I did run 'dnf reinstall mediawiki' and the MediaWiki 1.27.1 Updater did update the db schema correctly.
Your log messages indicate that your PHP installation is corrupt. This has nothing to do with mediawiki.
I'm experiencing the same problem after upgrading from Fedora 24 to 25. Loading the styles results in the error mentioned in the first post (after enabling wgShowExceptionDetails). The undefined function RelPath\getRelativePath() is defined in /usr/share/mediawiki/vendor/wikimedia/relpath/src/RelPath.php, but apparently this file does not get included. I don't know enough about the mediawiki module loading process to figure out how this file is supposed to be loaded. The missing style problem occurs both in two wiki instances that existed before the upgrade, and in a new instance that I've created after the upgrade. I've also found the "undefined symbol" errors in my /var/log/mediawiki-updates.log (logged during the 24->25 upgrade), but I'm not sure that these are related to the first problem. I think the mediawiki-rpm upgrade happens at time during the Fedora upgrade where all php-rpms haven't all been upgraded yet. When I manually run /usr/sbin/mw-updateallinstances after the 24->25 upgrade, these errors do not appear anymore.
I dug a little deeper into the rpm build, and I found out that mediawiki.spec seems to replace the (vendor) autoload mechanism from the upstream mediawiki. I noticed that it adds a few hard-coded includes to vendor/autoload.php for other modules, but not for relpath. As an experiment, I've appended the following line to vendor/autoload.php: require dirname(dirname(__FILE__)) . '/vendor/wikimedia/relpath/src/RelPath.php'; And my styles are back! :-) I'm not sure if this is the correct way to have RelPath.php loaded, but it's a good enough workaround until a fixed rpm comes out. I hope this helps.
That line to vendor/autoload.php fixed my stylesheets too. Thank you.
mediawiki-1.27.1-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-fe1878a39f
Adding: require dirname(dirname(__FILE__)) . '/vendor/wikimedia/relpath/src/RelPath.php'; to vendor/autoload.php fixed the problem for me too. I did a fresh install of Fedora 25.
mediawiki-1.27.1-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-fe1878a39f
mediawiki-1.27.1-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.