Topic on Extension talk:BootstrapComponents

Summary by Kghbln

Please update to version 5.0 and invoke correctly as explained.

Lotusccong (talkcontribs)

PHP 7.4.32 MW 1.39.0 SMW 4.0.2 Bootstrap 4.6.0.

After installed the BoostrapCompenants with Compose, I got the folling error message -

Fatal error: Uncaught TypeError: Argument 1 passed to wfLoadExtensions() must be of the type array, string given, called in /XX/ywfjctmfyw/public_html/LocalSettings.php on line 823 and defined in /XX/ywfjctmfyw/public_html/includes/GlobalFunctions.php:69 Stack trace: #0 /XX/public_html/LocalSettings.php(823): wfLoadExtensions() #1 /XX/public_html/includes/Setup.php(218): require_once('/home/887100....') #2 /XX/public_html/includes/WebStart.php(86): require_once('/home/887100.cl...') #3 /XX/public_html/index.php(44): require('/home/887100.cl...') #4 {main} thrown in /XX/public_html/includes/GlobalFunctions.php on line 69

Does it means that BoostrapCompenants not support with MW 1.39.0 ?

Oetterer (talkcontribs)

Please try release 5.0. This should be compatible with 1.39. If you still have issues, please let me know.

Lotusccong (talkcontribs)

Hi Oetterer,

Even I upgrade to Release 5.0 , I still can'tget the Extension loaded. It shoud the following error.

Fatal error: Uncaught TypeError: Argument 1 passed to wfLoadExtensions() must be of the type array, string given, called in /XXXpublic_html/LocalSettings.php on line 857 and defined in

XXX/public_html/includes/GlobalFunctions.php:69 Stack trace: #0 /XXX/public_html/LocalSettings.php(857): wfLoadExtensions() #1

XXX/public_html/includes/Setup.php(218): require_once('/XXX.') #2 XXX/public_html/includes/WebStart.php(86): require_once('/home/887100.cl...') #3

XXX/public_html/index.php(44): require('/XXX.') #4 {main} thrown in /XXX/public_html/includes/GlobalFunctions.php on line 69

Oetterer (talkcontribs)

You are using the extension loader function wrong, I think. You can either use wfLoadExtension() to load functions one by one as in

wfLoadExtension( 'Bootstrap' );
wfLoadExtension( 'BootstrapComponents' );

or you load them all in one by using wfLoadExtensions():

wfLoadExtensions( [ 'Bootstrap', 'BootstrapComponents'] );

Please not the additional s in the second example.

You are trying to use wfLoadExtensions(), but are supplying only a single extension (like wfLoadExtensions('BootstrapComponents');) which is causing the error, since this function expects multiple extensions as an array.

Lotusccong (talkcontribs)

I did load the Bootstrap before BootstrapCOmpenents. After I use the

wfLoadExtensions( [ 'Bootstrap', 'BootstrapComponents'] );

It was succesfully loaded withour any error. Thanks.