?
avatar Bakual
Bakual
19 Jun 2017

Steps to reproduce the issue

Edit an article in the association component

Expected result

No errors in console

Actual result

image
Uncaught TypeError: Cannot read property 'addEventListener' of undefined
at modal-associations.js:11
at modal-associations.js:25

System information (as much as possible)

Using Chrome

avatar Bakual Bakual - open - 19 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jun 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Jun 2017
avatar dgt41
dgt41 - comment - 19 Jun 2017

@Bakual I guess a simple change to

(function( Joomla, window) {
...
)(Joomla, window);

will fix that.

avatar Bakual
Bakual - comment - 19 Jun 2017

Can you do a PR? I don't understand what you mean.

avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Jun 2017
Category JavaScript
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Jun 2017
Status New Discussion
avatar dgt41
dgt41 - comment - 19 Jun 2017

Sure, although I have some more urgent things to do first.

What I meant is https://github.com/joomla/joomla-cms/blob/4.0-dev/media/com_associations/js/modal-associations.js#L25
needs to be

})(Joomla, window);

and the first line changed to (function( Joomla, window) {

avatar Bakual
Bakual - comment - 19 Jun 2017

Ah, now it's clear to me. Thanks.
I can do the PR now ?

avatar Bakual Bakual - change - 19 Jun 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-06-19 11:31:33
Closed_By Bakual
avatar Bakual Bakual - close - 19 Jun 2017
avatar Bakual
Bakual - comment - 19 Jun 2017

PR #16772

Add a Comment

Login with GitHub to post a comment