Topic on Manual talk:Extension registration

[RESOLVED] Loading multiple extensions

7
Summary by Berot3

I rebuilt the site with a fresh install and it looks like it's working properly again.

Prod (talkcontribs)

A bunch of extensions I use were updated with extension registration, but it seems the backwards compatibility isn't working for me. For example I have the following three extensions enabled:

require_once( "$IP/extensions/CharInsert/CharInsert.php" );
require_once( "$IP/extensions/Cite/Cite.php" );
require_once( "$IP/extensions/Gadgets/Gadgets.php" );

Only CharInsert is showing up in my Special:Version page, even though they're all using extension registration. All my other extensions which haven't been updated are still working. Is the backwards compatibility supposed to work without any further changes, or am I missing something?

Florianschmidtwelzow (talkcontribs)

CharInsert is the only extension, that doesn't force to use extension registration, Cite and Gadgets uses extension registration, still if you use "the old" installation method. Could you check, if you can install the extensions via:

wfLoadExtensions( array( 'CharInsert', 'Cite', 'Gadgets' ) );

?

Prod (talkcontribs)

I've switched to the wfLoadExtensions method and the output is still about the same (checking Special:Version). I tried enabling the debug log but nothing really jumped out at me. I'm on version 1.25.0-rc.0. I updated CharInsert to the master branch, and HitCounters to the latest code available, but the remaining extensions are on REL1_25.

Here's my LocalSettings.php.

Legoktm (talkcontribs)

The backwards-compatability should working, if not there's a bug. Can you enable the deubgging settings and see if anything comes up? What other extensions do you have installed? Can you pastebin your LocalSettings.php with passwords removed? And what version of MediaWiki are you using?

Paladox (talkcontribs)

CharInsert now does what the other two extensions do it now uses the extension.json.

Prod (talkcontribs)

I disabled all my extensions and tried the following tests, with results below. Cite and Gadgets are from REL1_25,

require_once( "$IP/extensions/Cite/Cite.php" ); Cite enabled, Gadgets disabled
require_once( "$IP/extensions/Gadgets/Gadgets.php" ); Cite disabled. Gadgets enabled
require_once( "$IP/extensions/Cite/Cite.php" );

require_once( "$IP/extensions/Gadgets/Gadgets.php" );

Cite enabled, Gadgets disabled
require_once( "$IP/extensions/Gadgets/Gadgets.php" );

require_once( "$IP/extensions/Cite/Cite.php" );

Cite disabled, Gadgets enabled
wfLoadExtensions( array( 'Cite', 'Gadgets' ); Cite enabled, Gadgets disabled
wfLoadExtensions( array( 'Gadgets', 'Cite' ); Cite disabled. Gadgets enabled

All my other extensions (which don't use registration) seem to work as normal and don't impact these tests. But only the first extension I enable through registration appears to be working.

Prod (talkcontribs)

Looks like I had some legacy files left over from a previous version causing conflicts. I rebuilt the site with a fresh install and it looks like it's working properly again. Thanks for the help Legoktm and Florianschmidtwelzow!