Ever since the release of 1.38, I have been trying unsuccessfully to upgrade from 1.37.x. I keep running into the same issues. If I start from my current 1.37.x base, I get the following errors when I run update.php:
============================ PHP Fatal error: Uncaught Exception: Unable to open file /Vector/skin.json: filemtime(): stat failed for /Vector/skin.json in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php:182 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/includes/GlobalFunctions.php(89): ExtensionRegistry->queue('/Vector/skin.js...') #1 /var/www/gpf/mediawiki-1.38.2/LocalSettings.php(305): wfLoadSkin('Vector') #2 /var/www/gpf/mediawiki-1.38.2/includes/Setup.php(204): require_once('/var/www/gpf/me...') #3 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once('/var/www/gpf/me...') #4 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #5 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php on line 182 ============================
It looks like it's trying to load the Vector skin from the root of my file system (/Vector.skin.json). If I try to force it to look in the skins directory with something like this in LocalSettings.php:
============================ $wgStyleDirectory = "$IP/skins"; ============================
I get a totally different set of errors:
============================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ============================
Since I haven't modified $wgBaseDirectory anywhere, including my LocalSettings.php, I'm not sure how to interpret this. I can only assume this variable is derived somehow. I am *NOT* trying to override my installation root directory; I'm just trying to get the upgrade script to see the skins directory.
The release notes for 1.38 state: " $wgStyleDirectory and $wgExtensionDirectory – These are now set later, so can no longer be used within LocalSettings.php unless explicitly set in that file." I have no idea how to interpret that; this sentence barely makes any sense. I can no longer set this variable in LocalSetings unless I set it in LocalSettings? The documentation here is somewhat... lacking.
At this point, I was able to get my site up to 1.37.3, but I cannot move forward to 1.38. I remember someone else posting to this list about a similar issue a few weeks ago, but I don't think they received any resolution. The only other possible thing I can think worth mentioning is that I've been running MediaWiki for years now, so I have no idea what ancient settings might still be lurking in my LocalSettings.php file that have been retired or changed meaning over the years. I've scanned through the file multiple times now and I can't find anything to looks out of place.
Any help would be appreciated.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
Hi Jeffrey, I think this is indeed the same issue as in the previous thread: https://lists.wikimedia.org/hyperkitty/list/mediawiki-l@lists.wikimedia.org/... Of course, you have reached the point where I didn't have a way forward. :-)
A bit of background information: I believe the change that release note refers to is this: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/757744
One possible culprit: Antique versions of MediaWiki set this snippet in LocalSettings.php at the top:
if( defined( 'MW_INSTALL_PATH' ) ) { $IP = MW_INSTALL_PATH; } else { $IP = dirname( __FILE__ ); }
It hasn't been necessary in over a decade but will still probably be there if you installed in the olden days. I'm not sure it would be causing problems here, but you might want to try removing it.
If that doesn't help, see if this brute-force approach fixes it temporarily:
$wgBaseDirectory = MW_INSTALL_PATH;
Let us know if any of that works.
On Sun, Jul 3, 2022 at 12:38 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Ever since the release of 1.38, I have been trying unsuccessfully to upgrade from 1.37.x. I keep running into the same issues. If I start from my current 1.37.x base, I get the following errors when I run update.php:
============================ PHP Fatal error: Uncaught Exception: Unable to open file /Vector/skin.json: filemtime(): stat failed for /Vector/skin.json in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php:182 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/includes/GlobalFunctions.php(89): ExtensionRegistry->queue('/Vector/skin.js...') #1 /var/www/gpf/mediawiki-1.38.2/LocalSettings.php(305): wfLoadSkin('Vector') #2 /var/www/gpf/mediawiki-1.38.2/includes/Setup.php(204): require_once('/var/www/gpf/me...') #3 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once('/var/www/gpf/me...') #4 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #5 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php on line 182 ============================
It looks like it's trying to load the Vector skin from the root of my file system (/Vector.skin.json). If I try to force it to look in the skins directory with something like this in LocalSettings.php:
============================ $wgStyleDirectory = "$IP/skins"; ============================
I get a totally different set of errors:
============================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ============================
Since I haven't modified $wgBaseDirectory anywhere, including my LocalSettings.php, I'm not sure how to interpret this. I can only assume this variable is derived somehow. I am *NOT* trying to override my installation root directory; I'm just trying to get the upgrade script to see the skins directory.
The release notes for 1.38 state: " $wgStyleDirectory and $wgExtensionDirectory – These are now set later, so can no longer be used within LocalSettings.php unless explicitly set in that file." I have no idea how to interpret that; this sentence barely makes any sense. I can no longer set this variable in LocalSetings unless I set it in LocalSettings? The documentation here is somewhat... lacking.
At this point, I was able to get my site up to 1.37.3, but I cannot move forward to 1.38. I remember someone else posting to this list about a similar issue a few weeks ago, but I don't think they received any resolution. The only other possible thing I can think worth mentioning is that I've been running MediaWiki for years now, so I have no idea what ancient settings might still be lurking in my LocalSettings.php file that have been retired or changed meaning over the years. I've scanned through the file multiple times now and I can't find anything to looks out of place.
Any help would be appreciated.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
Thanks for the suggestions, but no luck here. I did indeed have the old "$IP = MW_INSTALL_PATH" block. But if I comment that out, I still get the same "Unable to open file /Vector/skin.json" error. Same goes for the "$wgBaseDirectory = MW_INSTALL_PATH" suggestion; that gives me the "$wgBaseDirectory must not be modified in settings files!" error. Neither option seems to work for me.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
On Sun, Jul 3, 2022 at 2:57 PM Benjamin Lees emufarmers@gmail.com wrote:
Hi Jeffrey, I think this is indeed the same issue as in the previous thread: https://lists.wikimedia.org/hyperkitty/list/mediawiki-l@lists.wikimedia.org/... Of course, you have reached the point where I didn't have a way forward. :-)
A bit of background information: I believe the change that release note refers to is this: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/757744
One possible culprit: Antique versions of MediaWiki set this snippet in LocalSettings.php at the top:
if( defined( 'MW_INSTALL_PATH' ) ) { $IP = MW_INSTALL_PATH; } else { $IP = dirname( __FILE__ ); }
It hasn't been necessary in over a decade but will still probably be there if you installed in the olden days. I'm not sure it would be causing problems here, but you might want to try removing it.
If that doesn't help, see if this brute-force approach fixes it temporarily:
$wgBaseDirectory = MW_INSTALL_PATH;
Let us know if any of that works.
On Sun, Jul 3, 2022 at 12:38 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Ever since the release of 1.38, I have been trying unsuccessfully to upgrade from 1.37.x. I keep running into the same issues. If I start from my current 1.37.x base, I get the following errors when I run update.php:
============================ PHP Fatal error: Uncaught Exception: Unable to open file /Vector/skin.json: filemtime(): stat failed for /Vector/skin.json in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php:182 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/includes/GlobalFunctions.php(89): ExtensionRegistry->queue('/Vector/skin.js...') #1 /var/www/gpf/mediawiki-1.38.2/LocalSettings.php(305): wfLoadSkin('Vector') #2 /var/www/gpf/mediawiki-1.38.2/includes/Setup.php(204): require_once('/var/www/gpf/me...') #3 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once('/var/www/gpf/me...') #4 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #5 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php on line 182 ============================
It looks like it's trying to load the Vector skin from the root of my file system (/Vector.skin.json). If I try to force it to look in the skins directory with something like this in LocalSettings.php:
============================ $wgStyleDirectory = "$IP/skins"; ============================
I get a totally different set of errors:
============================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ============================
Since I haven't modified $wgBaseDirectory anywhere, including my LocalSettings.php, I'm not sure how to interpret this. I can only assume this variable is derived somehow. I am *NOT* trying to override my installation root directory; I'm just trying to get the upgrade script to see the skins directory.
The release notes for 1.38 state: " $wgStyleDirectory and $wgExtensionDirectory – These are now set later, so can no longer be used within LocalSettings.php unless explicitly set in that file." I have no idea how to interpret that; this sentence barely makes any sense. I can no longer set this variable in LocalSetings unless I set it in LocalSettings? The documentation here is somewhat... lacking.
At this point, I was able to get my site up to 1.37.3, but I cannot move forward to 1.38. I remember someone else posting to this list about a similar issue a few weeks ago, but I don't think they received any resolution. The only other possible thing I can think worth mentioning is that I've been running MediaWiki for years now, so I have no idea what ancient settings might still be lurking in my LocalSettings.php file that have been retired or changed meaning over the years. I've scanned through the file multiple times now and I can't find anything to looks out of place.
Any help would be appreciated.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
On Sun, Jul 3, 2022 at 6:19 PM Jeffrey T. Darlington jeff.darlington@gmail.com wrote:
Thanks for the suggestions, but no luck here. I did indeed have the old "$IP = MW_INSTALL_PATH" block. But if I comment that out, I still get the same "Unable to open file /Vector/skin.json" error. Same goes for the "$wgBaseDirectory = MW_INSTALL_PATH" suggestion; that gives me the "$wgBaseDirectory must not be modified in settings files!" error. Neither option seems to work for me.
I _think_ Vector became part of Core awhile back. Do you have a Vector in your skins/ directory? If so, you may want to delete it. If not, look at the offending line in LocalSettings.php, and comment it out. The stack trace will tell you the offending line in LocalSettings.php.
Jeff
Each time I upgrade, I unzip the archive to a new directory and copy over the images and extensions. So I've been using the "core" version of Vector for a while. That said, commenting out the line with wfLoadSkin('Vector') still generates the following error:
================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ================
I'm not modifying $wgBaseDirectory anywhere in my LocalSettings.php, so I don't see why it would be generating this error. (Note that all of the files in the stack trace are MediaWiki internal files.)
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
On Sun, Jul 3, 2022 at 6:44 PM Jeffrey Walton noloader@gmail.com wrote:
On Sun, Jul 3, 2022 at 6:19 PM Jeffrey T. Darlington jeff.darlington@gmail.com wrote:
Thanks for the suggestions, but no luck here. I did indeed have the old
"$IP = MW_INSTALL_PATH" block. But if I comment that out, I still get the same "Unable to open file /Vector/skin.json" error. Same goes for the "$wgBaseDirectory = MW_INSTALL_PATH" suggestion; that gives me the "$wgBaseDirectory must not be modified in settings files!" error. Neither option seems to work for me.
I _think_ Vector became part of Core awhile back. Do you have a Vector in your skins/ directory? If so, you may want to delete it. If not, look at the offending line in LocalSettings.php, and comment it out. The stack trace will tell you the offending line in LocalSettings.php.
Jeff _______________________________________________ MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
On Sun, Jul 3, 2022 at 6:57 PM Jeffrey T. Darlington jeff.darlington@gmail.com wrote:
Each time I upgrade, I unzip the archive to a new directory and copy over the images and extensions. So I've been using the "core" version of Vector for a while. That said, commenting out the line with wfLoadSkin('Vector') still generates the following error:
================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ================
I'm not modifying $wgBaseDirectory anywhere in my LocalSettings.php, so I don't see why it would be generating this error. (Note that all of the files in the stack trace are MediaWiki internal files.)
Yeah, we are at this point, too. We experience the error but don't know how to proceed.
I'm backing out of the MW 1.38 upgrade now. We can't proceed until the Foundation fixes something.
Jeff
On Sun, Jul 3, 2022 at 7:09 PM Jeffrey Walton noloader@gmail.com wrote:
On Sun, Jul 3, 2022 at 6:57 PM Jeffrey T. Darlington jeff.darlington@gmail.com wrote:
Each time I upgrade, I unzip the archive to a new directory and copy over the images and extensions. So I've been using the "core" version of Vector for a while. That said, commenting out the line with wfLoadSkin('Vector') still generates the following error:
================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ================
I'm not modifying $wgBaseDirectory anywhere in my LocalSettings.php, so I don't see why it would be generating this error. (Note that all of the files in the stack trace are MediaWiki internal files.)
Yeah, we are at this point, too. We experience the error but don't know how to proceed.
I'm backing out of the MW 1.38 upgrade now. We can't proceed until the Foundation fixes something.
I filed abug report on Phabricator at https://phabricator.wikimedia.org/T311966
Jeff
On Sun, Jul 3, 2022 at 6:57 PM Jeffrey T. Darlington jeff.darlington@gmail.com wrote:
Each time I upgrade, I unzip the archive to a new directory and copy over the images and extensions. So I've been using the "core" version of Vector for a while. That said, commenting out the line with wfLoadSkin('Vector') still generates the following error:
================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ================
I'm not modifying $wgBaseDirectory anywhere in my LocalSettings.php, so I don't see why it would be generating this error. (Note that all of the files in the stack trace are MediaWiki internal files.)
One thing I noticed is, we did not have problems with Skins but you did. (We had problems with Extensions).
Our LocalSettings.php has this, which may explain why we had no problems with Skins:
$wgStylePath = "$wgScriptPath/skins"; $wgStyleDirectory = "$IP/skins";
According to the manual at https://www.mediawiki.org/wiki/Manual:$wgStyleDirectory, wgStyleDirectory is set to null in 1.38. This is new behavior for 1.38.
Maybe you need to set $wgStyleDirectory and that will fix the problems with your skins.
(I still can't explain our problem with Extensions. Maybe I need to set $wgExtensionDirectory. The manual says it is null in 1.38.Previously it was set to "$IP/extensions").
Jeff
Hi. I had exact the same behavior with an x-times updated version of mediawiki. This could be solved by generating a fresh LocalSettings.php file generated by the installer. This makes even more sense since there have been some changes in declarations which won't make it in that file when upgrading always. I did it like that: - Install a fresh instance of current mediawiki somewhere in your web root. - Take the generated/downloaded LocalSettings.php from the fresh install. - Merge the individual settings of your old LocalSettings.php into the fresh generated one using the new declaration style (i.e. for your individual logo, allowed file types, rights, and so on). - Put the merged file in your old updated installation. - Run update.php
This will fix everything. No need for stylePath, extensionPath and all those hacks.
When done and working throw away the installation and database you made to generate your initial LocalSettings.php.
Hth, Steffi
On 04.07.22 01:51, Jeffrey Walton wrote:
On Sun, Jul 3, 2022 at 6:57 PM Jeffrey T. Darlington jeff.darlington@gmail.com wrote:
Each time I upgrade, I unzip the archive to a new directory and copy over the images and extensions. So I've been using the "core" version of Vector for a while. That said, commenting out the line with wfLoadSkin('Vector') still generates the following error:
================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ================
I'm not modifying $wgBaseDirectory anywhere in my LocalSettings.php, so I don't see why it would be generating this error. (Note that all of the files in the stack trace are MediaWiki internal files.)
One thing I noticed is, we did not have problems with Skins but you did. (We had problems with Extensions).
Our LocalSettings.php has this, which may explain why we had no problems with Skins:
$wgStylePath = "$wgScriptPath/skins"; $wgStyleDirectory = "$IP/skins";
According to the manual at https://www.mediawiki.org/wiki/Manual:$wgStyleDirectory, wgStyleDirectory is set to null in 1.38. This is new behavior for 1.38.
Maybe you need to set $wgStyleDirectory and that will fix the problems with your skins.
(I still can't explain our problem with Extensions. Maybe I need to set $wgExtensionDirectory. The manual says it is null in 1.38.Previously it was set to "$IP/extensions").
Jeff _______________________________________________ MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
Pretty strange, since the error in question literally checks "$wgBaseDirectory !== MW_INSTALL_PATH". Maybe there's something weird going on because of the order in which the files are initialized.
What does it output if you add debugging checks for $wgBaseDirectory and MW_INSTALL_PATH after line 235 in Setup.php?
On Sun, Jul 3, 2022 at 6:19 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Thanks for the suggestions, but no luck here. I did indeed have the old "$IP = MW_INSTALL_PATH" block. But if I comment that out, I still get the same "Unable to open file /Vector/skin.json" error. Same goes for the "$wgBaseDirectory = MW_INSTALL_PATH" suggestion; that gives me the "$wgBaseDirectory must not be modified in settings files!" error. Neither option seems to work for me.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
On Sun, Jul 3, 2022 at 2:57 PM Benjamin Lees emufarmers@gmail.com wrote:
Hi Jeffrey, I think this is indeed the same issue as in the previous thread: https://lists.wikimedia.org/hyperkitty/list/mediawiki-l@lists.wikimedia.org/... Of course, you have reached the point where I didn't have a way forward. :-)
A bit of background information: I believe the change that release note refers to is this: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/757744
One possible culprit: Antique versions of MediaWiki set this snippet in LocalSettings.php at the top:
if( defined( 'MW_INSTALL_PATH' ) ) { $IP = MW_INSTALL_PATH; } else { $IP = dirname( __FILE__ ); }
It hasn't been necessary in over a decade but will still probably be there if you installed in the olden days. I'm not sure it would be causing problems here, but you might want to try removing it.
If that doesn't help, see if this brute-force approach fixes it temporarily:
$wgBaseDirectory = MW_INSTALL_PATH;
Let us know if any of that works.
On Sun, Jul 3, 2022 at 12:38 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Ever since the release of 1.38, I have been trying unsuccessfully to upgrade from 1.37.x. I keep running into the same issues. If I start from my current 1.37.x base, I get the following errors when I run update.php:
============================ PHP Fatal error: Uncaught Exception: Unable to open file /Vector/skin.json: filemtime(): stat failed for /Vector/skin.json in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php:182 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/includes/GlobalFunctions.php(89): ExtensionRegistry->queue('/Vector/skin.js...') #1 /var/www/gpf/mediawiki-1.38.2/LocalSettings.php(305): wfLoadSkin('Vector') #2 /var/www/gpf/mediawiki-1.38.2/includes/Setup.php(204): require_once('/var/www/gpf/me...') #3 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once('/var/www/gpf/me...') #4 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #5 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php on line 182 ============================
It looks like it's trying to load the Vector skin from the root of my file system (/Vector.skin.json). If I try to force it to look in the skins directory with something like this in LocalSettings.php:
============================ $wgStyleDirectory = "$IP/skins"; ============================
I get a totally different set of errors:
============================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ============================
Since I haven't modified $wgBaseDirectory anywhere, including my LocalSettings.php, I'm not sure how to interpret this. I can only assume this variable is derived somehow. I am *NOT* trying to override my installation root directory; I'm just trying to get the upgrade script to see the skins directory.
The release notes for 1.38 state: " $wgStyleDirectory and $wgExtensionDirectory – These are now set later, so can no longer be used within LocalSettings.php unless explicitly set in that file." I have no idea how to interpret that; this sentence barely makes any sense. I can no longer set this variable in LocalSetings unless I set it in LocalSettings? The documentation here is somewhat... lacking.
At this point, I was able to get my site up to 1.37.3, but I cannot move forward to 1.38. I remember someone else posting to this list about a similar issue a few weeks ago, but I don't think they received any resolution. The only other possible thing I can think worth mentioning is that I've been running MediaWiki for years now, so I have no idea what ancient settings might still be lurking in my LocalSettings.php file that have been retired or changed meaning over the years. I've scanned through the file multiple times now and I can't find anything to looks out of place.
Any help would be appreciated.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
This is my second request to be removed from the email list as I no longer use MediaWiki. I have sent two emails to mediawiki-l-leave@lists.wikimedia.org and now the second reply into this Distro.
Thanks and have a great, safe 4th!
Thank you!
On Mon, Jul 4, 2022 at 2:07 AM Benjamin Lees emufarmers@gmail.com wrote:
Pretty strange, since the error in question literally checks "$wgBaseDirectory !== MW_INSTALL_PATH". Maybe there's something weird going on because of the order in which the files are initialized.
What does it output if you add debugging checks for $wgBaseDirectory and MW_INSTALL_PATH after line 235 in Setup.php?
On Sun, Jul 3, 2022 at 6:19 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Thanks for the suggestions, but no luck here. I did indeed have the old "$IP = MW_INSTALL_PATH" block. But if I comment that out, I still get the same "Unable to open file /Vector/skin.json" error. Same goes for the "$wgBaseDirectory = MW_INSTALL_PATH" suggestion; that gives me the "$wgBaseDirectory must not be modified in settings files!" error. Neither option seems to work for me.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
On Sun, Jul 3, 2022 at 2:57 PM Benjamin Lees emufarmers@gmail.com wrote:
Hi Jeffrey, I think this is indeed the same issue as in the previous thread: https://lists.wikimedia.org/hyperkitty/list/mediawiki-l@lists.wikimedia.org/... Of course, you have reached the point where I didn't have a way forward. :-)
A bit of background information: I believe the change that release note refers to is this: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/757744
One possible culprit: Antique versions of MediaWiki set this snippet in LocalSettings.php at the top:
if( defined( 'MW_INSTALL_PATH' ) ) { $IP = MW_INSTALL_PATH; } else { $IP = dirname( __FILE__ ); }
It hasn't been necessary in over a decade but will still probably be there if you installed in the olden days. I'm not sure it would be causing problems here, but you might want to try removing it.
If that doesn't help, see if this brute-force approach fixes it temporarily:
$wgBaseDirectory = MW_INSTALL_PATH;
Let us know if any of that works.
On Sun, Jul 3, 2022 at 12:38 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Ever since the release of 1.38, I have been trying unsuccessfully to upgrade from 1.37.x. I keep running into the same issues. If I start from my current 1.37.x base, I get the following errors when I run update.php:
============================ PHP Fatal error: Uncaught Exception: Unable to open file /Vector/skin.json: filemtime(): stat failed for /Vector/skin.json in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php:182 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/includes/GlobalFunctions.php(89): ExtensionRegistry->queue('/Vector/skin.js...') #1 /var/www/gpf/mediawiki-1.38.2/LocalSettings.php(305): wfLoadSkin('Vector') #2 /var/www/gpf/mediawiki-1.38.2/includes/Setup.php(204): require_once('/var/www/gpf/me...') #3 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once('/var/www/gpf/me...') #4 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #5 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php on line 182 ============================
It looks like it's trying to load the Vector skin from the root of my file system (/Vector.skin.json). If I try to force it to look in the skins directory with something like this in LocalSettings.php:
============================ $wgStyleDirectory = "$IP/skins"; ============================
I get a totally different set of errors:
============================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ============================
Since I haven't modified $wgBaseDirectory anywhere, including my LocalSettings.php, I'm not sure how to interpret this. I can only assume this variable is derived somehow. I am *NOT* trying to override my installation root directory; I'm just trying to get the upgrade script to see the skins directory.
The release notes for 1.38 state: " $wgStyleDirectory and $wgExtensionDirectory – These are now set later, so can no longer be used within LocalSettings.php unless explicitly set in that file." I have no idea how to interpret that; this sentence barely makes any sense. I can no longer set this variable in LocalSetings unless I set it in LocalSettings? The documentation here is somewhat... lacking.
At this point, I was able to get my site up to 1.37.3, but I cannot move forward to 1.38. I remember someone else posting to this list about a similar issue a few weeks ago, but I don't think they received any resolution. The only other possible thing I can think worth mentioning is that I've been running MediaWiki for years now, so I have no idea what ancient settings might still be lurking in my LocalSettings.php file that have been retired or changed meaning over the years. I've scanned through the file multiple times now and I can't find anything to looks out of place.
Any help would be appreciated.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
It never gets to this point. The error is apparently thrown before this.
Mind you, this is only if I keep this line in LocalSettings.php: require_once( "$IP/includes/DefaultSettings.php" );
If I remove that, $wgBaseDirectory and MW_INSTALL_PATH are the same value. So perhaps it has something to do with DefaultSettings.php being included twice...?
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
On Mon, Jul 4, 2022 at 2:07 AM Benjamin Lees emufarmers@gmail.com wrote:
Pretty strange, since the error in question literally checks "$wgBaseDirectory !== MW_INSTALL_PATH". Maybe there's something weird going on because of the order in which the files are initialized.
What does it output if you add debugging checks for $wgBaseDirectory and MW_INSTALL_PATH after line 235 in Setup.php?
On Sun, Jul 3, 2022 at 6:19 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Thanks for the suggestions, but no luck here. I did indeed have the old "$IP = MW_INSTALL_PATH" block. But if I comment that out, I still get the same "Unable to open file /Vector/skin.json" error. Same goes for the "$wgBaseDirectory = MW_INSTALL_PATH" suggestion; that gives me the "$wgBaseDirectory must not be modified in settings files!" error. Neither option seems to work for me.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
On Sun, Jul 3, 2022 at 2:57 PM Benjamin Lees emufarmers@gmail.com wrote:
Hi Jeffrey, I think this is indeed the same issue as in the previous thread: https://lists.wikimedia.org/hyperkitty/list/mediawiki-l@lists.wikimedia.org/... Of course, you have reached the point where I didn't have a way forward. :-)
A bit of background information: I believe the change that release note refers to is this: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/757744
One possible culprit: Antique versions of MediaWiki set this snippet in LocalSettings.php at the top:
if( defined( 'MW_INSTALL_PATH' ) ) { $IP = MW_INSTALL_PATH; } else { $IP = dirname( __FILE__ ); }
It hasn't been necessary in over a decade but will still probably be there if you installed in the olden days. I'm not sure it would be causing problems here, but you might want to try removing it.
If that doesn't help, see if this brute-force approach fixes it temporarily:
$wgBaseDirectory = MW_INSTALL_PATH;
Let us know if any of that works.
On Sun, Jul 3, 2022 at 12:38 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Ever since the release of 1.38, I have been trying unsuccessfully to upgrade from 1.37.x. I keep running into the same issues. If I start from my current 1.37.x base, I get the following errors when I run update.php:
============================ PHP Fatal error: Uncaught Exception: Unable to open file /Vector/skin.json: filemtime(): stat failed for /Vector/skin.json in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php:182 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/includes/GlobalFunctions.php(89): ExtensionRegistry->queue('/Vector/skin.js...') #1 /var/www/gpf/mediawiki-1.38.2/LocalSettings.php(305): wfLoadSkin('Vector') #2 /var/www/gpf/mediawiki-1.38.2/includes/Setup.php(204): require_once('/var/www/gpf/me...') #3 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once('/var/www/gpf/me...') #4 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #5 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php on line 182 ============================
It looks like it's trying to load the Vector skin from the root of my file system (/Vector.skin.json). If I try to force it to look in the skins directory with something like this in LocalSettings.php:
============================ $wgStyleDirectory = "$IP/skins"; ============================
I get a totally different set of errors:
============================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ============================
Since I haven't modified $wgBaseDirectory anywhere, including my LocalSettings.php, I'm not sure how to interpret this. I can only assume this variable is derived somehow. I am *NOT* trying to override my installation root directory; I'm just trying to get the upgrade script to see the skins directory.
The release notes for 1.38 state: " $wgStyleDirectory and $wgExtensionDirectory – These are now set later, so can no longer be used within LocalSettings.php unless explicitly set in that file." I have no idea how to interpret that; this sentence barely makes any sense. I can no longer set this variable in LocalSetings unless I set it in LocalSettings? The documentation here is somewhat... lacking.
At this point, I was able to get my site up to 1.37.3, but I cannot move forward to 1.38. I remember someone else posting to this list about a similar issue a few weeks ago, but I don't think they received any resolution. The only other possible thing I can think worth mentioning is that I've been running MediaWiki for years now, so I have no idea what ancient settings might still be lurking in my LocalSettings.php file that have been retired or changed meaning over the years. I've scanned through the file multiple times now and I can't find anything to looks out of place.
Any help would be appreciated.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
Very good catch. That line was added by the installer before a rework in MediaWiki 1.17 (2011). It has been causing DefaultSettings.php to be loaded twice since then, but that was harmless until 1.38. This explains why this problem didn't emerge before release, and why using a new LocalSettings.php file fixed it for Stefanie.
If you remove that line, are there any errors remaining?
On Mon, Jul 4, 2022 at 11:16 AM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
It never gets to this point. The error is apparently thrown before this.
Mind you, this is only if I keep this line in LocalSettings.php: require_once( "$IP/includes/DefaultSettings.php" );
If I remove that, $wgBaseDirectory and MW_INSTALL_PATH are the same value. So perhaps it has something to do with DefaultSettings.php being included twice...?
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
On Mon, Jul 4, 2022 at 2:07 AM Benjamin Lees emufarmers@gmail.com wrote:
Pretty strange, since the error in question literally checks "$wgBaseDirectory !== MW_INSTALL_PATH". Maybe there's something weird going on because of the order in which the files are initialized.
What does it output if you add debugging checks for $wgBaseDirectory and MW_INSTALL_PATH after line 235 in Setup.php?
On Sun, Jul 3, 2022 at 6:19 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Thanks for the suggestions, but no luck here. I did indeed have the old "$IP = MW_INSTALL_PATH" block. But if I comment that out, I still get the same "Unable to open file /Vector/skin.json" error. Same goes for the "$wgBaseDirectory = MW_INSTALL_PATH" suggestion; that gives me the "$wgBaseDirectory must not be modified in settings files!" error. Neither option seems to work for me.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
On Sun, Jul 3, 2022 at 2:57 PM Benjamin Lees emufarmers@gmail.com wrote:
Hi Jeffrey, I think this is indeed the same issue as in the previous thread: https://lists.wikimedia.org/hyperkitty/list/mediawiki-l@lists.wikimedia.org/... Of course, you have reached the point where I didn't have a way forward. :-)
A bit of background information: I believe the change that release note refers to is this: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/757744
One possible culprit: Antique versions of MediaWiki set this snippet in LocalSettings.php at the top:
if( defined( 'MW_INSTALL_PATH' ) ) { $IP = MW_INSTALL_PATH; } else { $IP = dirname( __FILE__ ); }
It hasn't been necessary in over a decade but will still probably be there if you installed in the olden days. I'm not sure it would be causing problems here, but you might want to try removing it.
If that doesn't help, see if this brute-force approach fixes it temporarily:
$wgBaseDirectory = MW_INSTALL_PATH;
Let us know if any of that works.
On Sun, Jul 3, 2022 at 12:38 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Ever since the release of 1.38, I have been trying unsuccessfully to upgrade from 1.37.x. I keep running into the same issues. If I start from my current 1.37.x base, I get the following errors when I run update.php:
============================ PHP Fatal error: Uncaught Exception: Unable to open file /Vector/skin.json: filemtime(): stat failed for /Vector/skin.json in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php:182 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/includes/GlobalFunctions.php(89): ExtensionRegistry->queue('/Vector/skin.js...') #1 /var/www/gpf/mediawiki-1.38.2/LocalSettings.php(305): wfLoadSkin('Vector') #2 /var/www/gpf/mediawiki-1.38.2/includes/Setup.php(204): require_once('/var/www/gpf/me...') #3 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once('/var/www/gpf/me...') #4 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #5 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php on line 182 ============================
It looks like it's trying to load the Vector skin from the root of my file system (/Vector.skin.json). If I try to force it to look in the skins directory with something like this in LocalSettings.php:
============================ $wgStyleDirectory = "$IP/skins"; ============================
I get a totally different set of errors:
============================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ============================
Since I haven't modified $wgBaseDirectory anywhere, including my LocalSettings.php, I'm not sure how to interpret this. I can only assume this variable is derived somehow. I am *NOT* trying to override my installation root directory; I'm just trying to get the upgrade script to see the skins directory.
The release notes for 1.38 state: " $wgStyleDirectory and $wgExtensionDirectory – These are now set later, so can no longer be used within LocalSettings.php unless explicitly set in that file." I have no idea how to interpret that; this sentence barely makes any sense. I can no longer set this variable in LocalSetings unless I set it in LocalSettings? The documentation here is somewhat... lacking.
At this point, I was able to get my site up to 1.37.3, but I cannot move forward to 1.38. I remember someone else posting to this list about a similar issue a few weeks ago, but I don't think they received any resolution. The only other possible thing I can think worth mentioning is that I've been running MediaWiki for years now, so I have no idea what ancient settings might still be lurking in my LocalSettings.php file that have been retired or changed meaning over the years. I've scanned through the file multiple times now and I can't find anything to looks out of place.
Any help would be appreciated.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
No. Once I commented that out, the update script ran successfully. My wiki is now at 1.38.2.
I will look into trying to generate a new LocalSettings.php file during the next upgrade, if I can remember to. That said, I run a smallish site and I'm a one-man shop, juggling several third-party apps in addition to my own code. It's hard to set aside time to keep up with upgrades (and I'm more obsessive than most about it), let alone install fresh code from scratch.
Most often when I get bit by a MediaWiki issue, it's situations like this, where some ancient setting installed 14 years ago falls out of scope. It's not exactly reasonable to ask users to go digging through 21 major(?) versions of release notes to figure out that something changed 11 years ago and the current version breaks it. Then again, I don't have any good suggestions on how to improve that situation either. I maintain sites and APIs that others call, and deprecating old code is both necessary and trouble-inducing. Just... venting some frustration here.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
On Mon, Jul 4, 2022 at 12:22 PM Benjamin Lees emufarmers@gmail.com wrote:
Very good catch. That line was added by the installer before a rework in MediaWiki 1.17 (2011). It has been causing DefaultSettings.php to be loaded twice since then, but that was harmless until 1.38. This explains why this problem didn't emerge before release, and why using a new LocalSettings.php file fixed it for Stefanie.
If you remove that line, are there any errors remaining?
On Mon, Jul 4, 2022 at 11:16 AM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
It never gets to this point. The error is apparently thrown before this.
Mind you, this is only if I keep this line in LocalSettings.php: require_once( "$IP/includes/DefaultSettings.php" );
If I remove that, $wgBaseDirectory and MW_INSTALL_PATH are the same value. So perhaps it has something to do with DefaultSettings.php being included twice...?
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
On Mon, Jul 4, 2022 at 2:07 AM Benjamin Lees emufarmers@gmail.com wrote:
Pretty strange, since the error in question literally checks "$wgBaseDirectory !== MW_INSTALL_PATH". Maybe there's something weird going on because of the order in which the files are initialized.
What does it output if you add debugging checks for $wgBaseDirectory and MW_INSTALL_PATH after line 235 in Setup.php?
On Sun, Jul 3, 2022 at 6:19 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Thanks for the suggestions, but no luck here. I did indeed have the old "$IP = MW_INSTALL_PATH" block. But if I comment that out, I still get the same "Unable to open file /Vector/skin.json" error. Same goes for the "$wgBaseDirectory = MW_INSTALL_PATH" suggestion; that gives me the "$wgBaseDirectory must not be modified in settings files!" error. Neither option seems to work for me.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
On Sun, Jul 3, 2022 at 2:57 PM Benjamin Lees emufarmers@gmail.com wrote:
Hi Jeffrey, I think this is indeed the same issue as in the previous thread: https://lists.wikimedia.org/hyperkitty/list/mediawiki-l@lists.wikimedia.org/... Of course, you have reached the point where I didn't have a way forward. :-)
A bit of background information: I believe the change that release note refers to is this: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/757744
One possible culprit: Antique versions of MediaWiki set this snippet in LocalSettings.php at the top:
if( defined( 'MW_INSTALL_PATH' ) ) { $IP = MW_INSTALL_PATH; } else { $IP = dirname( __FILE__ ); }
It hasn't been necessary in over a decade but will still probably be there if you installed in the olden days. I'm not sure it would be causing problems here, but you might want to try removing it.
If that doesn't help, see if this brute-force approach fixes it temporarily:
$wgBaseDirectory = MW_INSTALL_PATH;
Let us know if any of that works.
On Sun, Jul 3, 2022 at 12:38 PM Jeffrey T. Darlington < jeff.darlington@gmail.com> wrote:
Ever since the release of 1.38, I have been trying unsuccessfully to upgrade from 1.37.x. I keep running into the same issues. If I start from my current 1.37.x base, I get the following errors when I run update.php:
============================ PHP Fatal error: Uncaught Exception: Unable to open file /Vector/skin.json: filemtime(): stat failed for /Vector/skin.json in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php:182 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/includes/GlobalFunctions.php(89): ExtensionRegistry->queue('/Vector/skin.js...') #1 /var/www/gpf/mediawiki-1.38.2/LocalSettings.php(305): wfLoadSkin('Vector') #2 /var/www/gpf/mediawiki-1.38.2/includes/Setup.php(204): require_once('/var/www/gpf/me...') #3 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once('/var/www/gpf/me...') #4 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #5 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/registration/ExtensionRegistry.php on line 182 ============================
It looks like it's trying to load the Vector skin from the root of my file system (/Vector.skin.json). If I try to force it to look in the skins directory with something like this in LocalSettings.php:
============================ $wgStyleDirectory = "$IP/skins"; ============================
I get a totally different set of errors:
============================ PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php:237 Stack trace: #0 /var/www/gpf/mediawiki-1.38.2/maintenance/doMaintenance.php(96): require_once() #1 /var/www/gpf/mediawiki-1.38.2/maintenance/update.php(264): require_once('/var/www/gpf/me...') #2 {main} thrown in /var/www/gpf/mediawiki-1.38.2/includes/Setup.php on line 237 ============================
Since I haven't modified $wgBaseDirectory anywhere, including my LocalSettings.php, I'm not sure how to interpret this. I can only assume this variable is derived somehow. I am *NOT* trying to override my installation root directory; I'm just trying to get the upgrade script to see the skins directory.
The release notes for 1.38 state: " $wgStyleDirectory and $wgExtensionDirectory – These are now set later, so can no longer be used within LocalSettings.php unless explicitly set in that file." I have no idea how to interpret that; this sentence barely makes any sense. I can no longer set this variable in LocalSetings unless I set it in LocalSettings? The documentation here is somewhat... lacking.
At this point, I was able to get my site up to 1.37.3, but I cannot move forward to 1.38. I remember someone else posting to this list about a similar issue a few weeks ago, but I don't think they received any resolution. The only other possible thing I can think worth mentioning is that I've been running MediaWiki for years now, so I have no idea what ancient settings might still be lurking in my LocalSettings.php file that have been retired or changed meaning over the years. I've scanned through the file multiple times now and I can't find anything to looks out of place.
Any help would be appreciated.
Jeffrey T. Darlington General Protection Fault https://www.gpf-comics.com/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
On Mon, Jul 4, 2022 at 12:45 PM Jeffrey T. Darlington jeff.darlington@gmail.com wrote:
... Most often when I get bit by a MediaWiki issue, it's situations like this, where some ancient setting installed 14 years ago falls out of scope. It's not exactly reasonable to ask users to go digging through 21 major(?) versions of release notes to figure out that something changed 11 years ago and the current version breaks it. Then again, I don't have any good suggestions on how to improve that situation either. I maintain sites and APIs that others call, and deprecating old code is both necessary and trouble-inducing. Just... venting some frustration here.
It would be helpful if Mediawiki put a new LocalSettings.php in the tarball so we can see what a modern one looks like.
Our upgrade process [1] makes provisions for a Mediawiki-distributed LocalSettings.php, but one is never provided. Our process says to copy Mediawiki's tarball LocalSettings.php to LocalSettings.php.orig to preserve a pristine one for reference. But when things go sideways we never have a reference to check.
Reusing an existing LocalSettings.php is part of Mediawiki's published upgrade process. [2] "Adapt your LocalSettings.php" is not really helpful. [3] For example, it did not tell us to remove a call to DefaultSettings.php from our LocalSettings.php.
[1] https://github.com/weidai11/website/blob/master/mediawiki/wiki-upgrade.txt [2] https://www.mediawiki.org/wiki/Manual:Upgrading#Other_files [3] https://www.mediawiki.org/wiki/Manual:Upgrading#Adapt_your_LocalSettings.php
Jeff
On 4 Jul 2022, at 18:06, Jeffrey Walton noloader@gmail.com wrote:
It would be helpful if Mediawiki put a new LocalSettings.php in the tarball so we can see what a modern one looks like.
I agree with this. A couple of years ago I ran into the same (or at least a very similar) problem: https://www.mediawiki.org/wiki/Topic:Vybbgss0yihimkrs
Best wishes
Jonathan
mediawiki-l@lists.wikimedia.org