Topic on Extension talk:SimpleBatchUpload

blank page after entering wfLoadExtension( 'SimpleBatchUpload' );

9
Summary by Kghbln

Make sure that Compser is either installed globally or in the correct directory.

Onebigear (talkcontribs)

I installed it with composer, and there is a SimpleBatchUpload directory in the extensions folder. However, as soon as I proceed to add the configuration to LocalSetting.php, my wiki page turns blank...

does anyone know what causes this problem?


mw:1.34.0

php: v7.3.14-1~deb10u1


Kghbln (talkcontribs)

What does the server say? You should enable error reporting. I most cases this already will provide the decisive clues.

Onebigear (talkcontribs)

yes, here it is:


Fatal error: Uncaught UnexpectedValueException: callback 'SimpleBatchUpload\SimpleBatchUpload::initCallback' is not callable in /var/lib/mediawiki/includes/registration/ExtensionRegistry.php:438 Stack trace: #0 /var/lib/mediawiki/includes/registration/ExtensionRegistry.php(187): ExtensionRegistry->exportExtractedData(Array) #1 /var/lib/mediawiki/includes/Setup.php(143): ExtensionRegistry->loadFromQueue() #2 /var/lib/mediawiki/includes/WebStart.php(81): require_once('/var/lib/mediaw...') #3 /var/lib/mediawiki/index.php(41): require('/var/lib/mediaw...') #4 {main} thrown in /var/lib/mediawiki/includes/registration/ExtensionRegistry.php on line 438

Onebigear (talkcontribs)

I don't know if this helps: when composer installed the extension, SimpleBatchUpload is stored in a newly created extensions directory parallel to the mediawiki directory. I did the installation in /var/lib which contains both mediawiki and composer.phar

Inside mediawiki directory, there is original extensions directory that came with mediawiki installation. I moved SimpleBatchUpload to that directory.

Kghbln (talkcontribs)

> I don't know if this helps:

This explains why all of this is failing.

> I moved SimpleBatchUpload to that directory.

What happens if you do not move the files?

If this does not help I guess that the extension does not support the environment structure you are using. Not sure how to tell composer to adapt to it. Worth creating an issue report on GitHub for this.

Onebigear (talkcontribs)

I deleted the SimpleBatchUpload directory in mediawiki extensions. the error complained about the removal of the directory:

Fatal error: Uncaught Exception: Unable to open file /var/lib/mediawiki/extensions/SimpleBatchUpload/extension.json: filemtime(): stat failed for /var/lib/mediawiki/extensions/SimpleBatchUpload/extension.json in /var/lib/mediawiki/includes/registration/ExtensionRegistry.php:136 Stack trace: #0 /var/lib/mediawiki/includes/GlobalFunctions.php(52): ExtensionRegistry->queue('/var/lib/mediaw...') #1 /var/lib/mediawiki/LocalSettings.php(131): wfLoadExtension('SimpleBatchUplo...') #2 /var/lib/mediawiki/includes/Setup.php(124): require_once('/var/lib/mediaw...') #3 /var/lib/mediawiki/includes/WebStart.php(81): require_once('/var/lib/mediaw...') #4 /var/lib/mediawiki/index.php(45): require('/var/lib/mediaw...') #5 {main} thrown in /var/lib/mediawiki/includes/registration/ExtensionRegistry.php on line 136

I will try to:

  1. install composer for another time and try again.
  2. if above fails, I try to download the extension tar ball and extract
Onebigear (talkcontribs)

for reference:

after removal of the directory and I run php composer.phar update mediawiki/simple-batch-download

it complains: Package "mediawiki/simple-batch-download" listed for update is not installed. Ignoring.

Onebigear (talkcontribs)

feedback:

thanks for identifying the directory problem in the first place.

I uninstalled composer, installed it in the /var/lib/mediawiki again. everything works fine now.

Kghbln (talkcontribs)

Yeah, indeed there is a difference in installing Composer globally or not. Great that it worked out. This will help others, too. Thanks for providing feedback!