?
avatar chmst
chmst
29 Jan 2021

Steps to reproduce the issue

Fresh installation 4.0 dev, after npm ci. Open Global Configuration, watch Console

bootstrap-not-defined

On Xampp, win10.

avatar chmst chmst - open - 29 Jan 2021
avatar joomla-cms-bot joomla-cms-bot - change - 29 Jan 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 29 Jan 2021
avatar dgrammatiko
dgrammatiko - comment - 29 Jan 2021

That's probably because of a wrong order of the scripts. Try moving

$wam->useStyle('webcomponent.field-media')
->useScript('webcomponent.field-media');

before

Text::script('JLIB_FORM_MEDIA_PREVIEW_EMPTY', true);

PS. Nope, that's not the problem. Change


to

})(customElements, Joomla, bootstrap);

and

to

((customElements, Joomla, bootstrap) => {
avatar chmst
chmst - comment - 29 Jan 2021

With these changes

((customElements, Joomla, bootstrap) => {
...
})(customElements, Joomla, bootstrap);

the first two errors have gone, it remains the third one at line 247.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32185.
avatar dgrammatiko
dgrammatiko - comment - 29 Jan 2021

Try changing

&& bootstrap.Modal.getInstance(this.modalElement) === undefined)

to

&& bootstrap.Modal.getInstance
&& bootstrap.Modal.getInstance(this.modalElement) === undefined)
avatar chmst chmst - change - 29 Jan 2021
Title
[4.0] Uncaught Refference Error - boostrap not definded
[4.0] Uncaught Reference Error - boostrap not definded
avatar chmst chmst - edited - 29 Jan 2021
avatar chmst
chmst - comment - 29 Jan 2021

@dgrammatiko thank you for instructions, sorry but id does not work. Maybe I missed something but also with latest changes (and npm ..) I see the error Uncaught ReferenceError: bootstrap is not defined (line 247).

avatar dgrammatiko
dgrammatiko - comment - 30 Jan 2021

@chmst check #32193

avatar chmst chmst - change - 30 Jan 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-01-30 08:15:47
Closed_By chmst
avatar chmst chmst - close - 30 Jan 2021
avatar chmst
chmst - comment - 30 Jan 2021

Closing as there is a PR

Add a Comment

Login with GitHub to post a comment