?
avatar C-Lodder
C-Lodder
22 Jun 2020

Steps to reproduce the issue

  1. Login to the Joomla backend
  2. At the bottom of the dashboard, click the Add module to the dashboard link
  3. Close the modal using the Close button in the footer

Actual result

content.querySelector(...) is null --- admin-add_module.min.js

avatar C-Lodder C-Lodder - open - 22 Jun 2020
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jun 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Jun 2020
avatar brianteeman
brianteeman - comment - 22 Jun 2020

I'm sure we had this before

avatar ReLater
ReLater - comment - 22 Jun 2020

I can't reproduce the issue with current nightly, WIN10, Firefox 77.0.1 (64)

avatar ChristineWk
ChristineWk - comment - 22 Jun 2020

I also can't reproduce above issue - OK dev2 appr. 14 days old :-)
BTW: Is this here still pending? https://issues.joomla.org/tracker/joomla-cms/29131 - because it works


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29759.

avatar C-Lodder
C-Lodder - comment - 22 Jun 2020

@ReLater @ChristineWk are you clicking the Close button in the footer, as opposed to the X icon at the top?

avatar brianteeman
brianteeman - comment - 22 Jun 2020

admin-add_module.min.js?60415fa56b4bc7e8b11dbbf756b52527:1 Uncaught TypeError: Cannot read property 'click' of null
at HTMLButtonElement. (admin-add_module.min.js?60415fa56b4bc7e8b11dbbf756b52527:1)

avatar ReLater
ReLater - comment - 22 Jun 2020

@C-Lodder

are you clicking the Close button in the footer, as opposed to the X icon at the top?

Yes, I tested both BUT: like @ChristineWk I use an older nightly that I've updated today to current nightly.

avatar ReLater
ReLater - comment - 22 Jun 2020

I make a clean installation and will come back.

avatar ChristineWk
ChristineWk - comment - 22 Jun 2020

@ReLater @ChristineWk are you clicking the Close button in the footer, as opposed to the X icon at the top?

yes of course. Will also install nightly, but it takes time.

avatar ReLater
ReLater - comment - 22 Jun 2020

No change after new installation of nightly (built: Monday, 22 June 2020 02:00:23 UTC).

Nothing done, nothing configured, nothing else installed.

Can't confirm.

System Information
Setting Value
PHP Built On Linux dd46134 4.15.0-106-generic #107~16.04.1-Ubuntu SMP Thu Jun 4 15:40:05 UTC 2020 x86_64
Database Type mysql
Database Version 5.7.28-nmm1-log
Database Collation latin1_swedish_ci
Database Connection Collation utf8mb4_general_ci
Database Connection Encryption None
Database Server Supports Connection Encryption Yes
PHP Version 7.4.5
Web Server Apache
WebServer to PHP Interface fpm-fcgi
Joomla! Version Joomla! 4.0.0-beta2-dev Development [ Mañana ] 30-May-2020 21:13 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0

avatar richard67
richard67 - comment - 22 Jun 2020

I can reproduce that on a 4.0-dev from today afternoon. With debug on I get for the uncompresses js:

TypeError: content.querySelector(...) is null in file admin-add_module.js, line 56, column 21.

With debug off I get the same for the compressed js.

Server is Linux, browser is Firefox 77.0.1 (64-Bit) for Windows.

avatar richard67 richard67 - change - 22 Jun 2020
Status New Confirmed
avatar richard67
richard67 - comment - 22 Jun 2020

Confirmed.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29759.

avatar richard67
richard67 - comment - 22 Jun 2020

Hmm, clickTarget is equal to "#closeBtn" in the debugger, that's right.

Then comes:

            var iframe = document.querySelector('#moduleDashboardAddModal iframe');
            var content = iframe.contentDocument || iframe.contentWindow.document;
            content.querySelector(clickTarget).click();

content is set in the debugger, so the above seemt to work, too.

But the content.querySelector(clickTarget).click() looks to me as if the query selector would search for the close button inside the iframe. That seems strange to me.

@C-Lodder Any idea? I am not good in JS.

avatar ChristineWk
ChristineWk - comment - 22 Jun 2020

Didn't yet read above comments. Will do this later. At the moment FYI:
Installed now Nightly Fully from June22nd.
Also nothing installed yet.

System Information

php: Linux my hoster infos .... x86_64 #1 SMP Tue Jan 28 06:31:49 EST 2020 x86_64
dbserver: mysql
dbversion: 5.7.29-log
dbcollation: latin1_swedish_ci
dbconnectioncollation: utf8mb4_general_ci
dbconnectionencryption:
dbconnencryptsupported: true
phpversion: 7.3.18
server: Apache
sapi_name: cgi-fcgi
version: Joomla! 4.0.0-beta2-dev Development [ Mañana ] 30-May-2020 21:13 GMT
useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29759.

avatar ChristineWk
ChristineWk - comment - 22 Jun 2020

Sorry, don't know why I got h1 Could someone change this? .....


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29759.

avatar richard67
richard67 - comment - 22 Jun 2020

What I did: I made a new installation, logged in to backend, then on the Home Dashboard clicked in the area "Add module to the dashboard", and then in the modal I clicked the red "Close" button at the bottom right corner, i.e. not the "X" at the top right corner, while watching the broswer's error console. That was all I did for reproducing.

avatar richard67
richard67 - comment - 22 Jun 2020

Sorry, don't know why I got h1 Could someone change this? .....

Done.

avatar richard67
richard67 - comment - 22 Jun 2020

The h1 came from the ======= row directly following a text.

avatar ChristineWk
ChristineWk - comment - 22 Jun 2020

Tks @richard67 :-)

Confirm: clicked also the red "Close" button.

avatar ReLater
ReLater - comment - 22 Jun 2020

I ran a build.php over a fresh clone of this repository and uploaded all files of a newly created installtion package to the server after comparing all files if it can work that simple (without new installation).

I still can't confirm the issue.

Maybe an environment thing? Xampp, Wamp whatever? What are you using?

avatar richard67
richard67 - comment - 22 Jun 2020

Server=Apache 2.4 on Linux, PHP 7.3, MySQL 8. Broswer = Firefox 77.0.1 (64-Bit) on Windows 10.

avatar ReLater
ReLater - comment - 22 Jun 2020

Lastly I made a new installation with package mentioned in #29759 (comment)
and switched to PHP 7.3.17-nmm1.

I'm giving up. Can't confirm.

I don't think that the MySQL version, 7 versus 8, can be the reason....

avatar richard67
richard67 - comment - 22 Jun 2020

Don't think either.

avatar Harmageddon
Harmageddon - comment - 23 Jun 2020

Can confirm the issue as well on a current nightly. Maybe to clarify: Note that this doesn't seem to break anything. The "Close" button in the modal footer still works (at least it does for me). But it causes the JavaScript error mentioned above to be logged in the browser console.

If I see it right, this functionality was implemented for modals that contain their own "save" and "cancel" buttons. So when the modal is closed from the outside, we want to cancel the form inside the modal. This would be done by "clicking" the element #closeBtn inside the iframe.
This is the case when we click on "Add Module" and select a module type, so we are seeing the "edit module" form inside the modal. But before having chosen a module type, there is no cancel button and thus, the error occurs.

avatar alikon alikon - change - 23 Jun 2020
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2020-06-23 17:45:44
Closed_By alikon
avatar alikon alikon - close - 23 Jun 2020
avatar alikon
alikon - comment - 23 Jun 2020

closing as we have a pr for testing #29771

Add a Comment

Login with GitHub to post a comment