Page MenuHomePhabricator

Lockdown.alias.php should read Lockdown.php (to avoid warnings)?
Closed, ResolvedPublicBUG REPORT

Description

Running the latest MW version (1.34) and the latest Lockdown 1.34 version "(0aac342) 09:20, 12. Nov. 2019".

This is what I saw after upgrading from MW 1.31 to MW 1.34.

Warning: include(/html/secret-wiki-test2/mediawiki/extensions/Lockdown/Lockdown.alias.php): failed to open stream: No such file or directory in /html/secret-wiki-test2/mediawiki/includes/cache/localisation/LocalisationCache.php on line 548

Warning: include(/html/secret-wiki-test2/mediawiki/extensions/Lockdown/Lockdown.alias.php): failed to open stream: No such file or directory in /html/secret-wiki-test2/mediawiki/includes/cache/localisation/LocalisationCache.php on line 548

Warning: include(): Failed opening '/html/secret-wiki-test2/mediawiki/extensions/Lockdown/Lockdown.alias.php' for inclusion (include_path='/html/secret-wiki-test2/mediawiki/vendor/pear/console_getopt:/html/secret-wiki-test2/mediawiki/vendor/pear/mail:/html/secret-wiki-test2/mediawiki/vendor/pear/mail_mime:/html/secret-wiki-test2/mediawiki/vendor/pear/net_smtp:/html/secret-wiki-test2/mediawiki/vendor/pear/net_socket:/html/secret-wiki-test2/mediawiki/vendor/pear/pear-core-minimal/src:/html/secret-wiki-test2/mediawiki/vendor/pear/pear_exception:.:/usr/local/pear') in /html/secret-wiki-test2/mediawiki/includes/cache/localisation/LocalisationCache.php on line 548

In Lockdown.php if I change line 6 from

$wgExtensionMessagesFiles['LockdownAlias'] = __DIR__ . '/Lockdown.alias.php';

to

$wgExtensionMessagesFiles['LockdownAlias'] = __DIR__ . '/Lockdown.php';

the warning disappears. But I'm not sure if this is the fix and if it causes other problems.

In MW 1.3.1 I got the error every time after I changed something on my setup (like enabling / disabling an extension) :

Who can fix this?

Regards,
Stefan

Event Timeline

Stefahn created this task.Sep 27 2019, 5:30 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 27 2019, 5:30 AM
Stefahn updated the task description. (Show Details)Sep 30 2019, 8:54 AM
Stefahn renamed this task from MW 1.31: Lockdown fails to open something from /mediawiki/includes/cache/localisation/LocalisationCache.php to Lockdown.alias.php should read Lockdown.php (to avoid warnings)?.Feb 2 2020, 9:33 PM
Stefahn updated the task description. (Show Details)
Kghbln added a subscriber: Kghbln.EditedMar 14 2020, 11:17 AM

the warning disappears. But I'm not sure if this is the fix and if it causes other problems.

You are just avoid the errors but not fixing the issue. The whole line needs to be removed since Lockdown does not provide a special page hence it does not have and alias file. Will author a change. Issue mistakenly introduced with commit a9336fb.

Change 579700 had a related patch set uploaded (by Kghbln; owner: Kghbln):
[mediawiki/extensions/Lockdown@master] Remove call to non-existing alias file

https://gerrit.wikimedia.org/r/579700

Change 579701 had a related patch set uploaded (by Kghbln; owner: Kghbln):
[mediawiki/extensions/Lockdown@REL1_31] Remove call to non-existing alias file

https://gerrit.wikimedia.org/r/579701

Change 579700 merged by jenkins-bot:
[mediawiki/extensions/Lockdown@master] Remove call to non-existing alias file

https://gerrit.wikimedia.org/r/579700

Change 579702 had a related patch set uploaded (by Kghbln; owner: Kghbln):
[mediawiki/extensions/Lockdown@REL1_33] Remove call to non-existing alias file

https://gerrit.wikimedia.org/r/579702

Change 579703 had a related patch set uploaded (by Kghbln; owner: Kghbln):
[mediawiki/extensions/Lockdown@REL1_34] Remove call to non-existing alias file

https://gerrit.wikimedia.org/r/579703

Kghbln closed this task as Resolved.Mar 14 2020, 11:30 AM
Kghbln claimed this task.
Kghbln removed a project: Patch-For-Review.

Change 579703 merged by jenkins-bot:
[mediawiki/extensions/Lockdown@REL1_34] Remove call to non-existing alias file

https://gerrit.wikimedia.org/r/579703

Change 579702 merged by jenkins-bot:
[mediawiki/extensions/Lockdown@REL1_33] Remove call to non-existing alias file

https://gerrit.wikimedia.org/r/579702

Change 579701 merged by Umherirrender:
[mediawiki/extensions/Lockdown@REL1_31] Remove call to non-existing alias file

https://gerrit.wikimedia.org/r/579701

Thanks a lot Karsten for fixing this!