Add module to the dashboard
linkClose
button in the footercontent.querySelector(...) is null --- admin-add_module.min.js
Labels |
Added:
?
|
I can't reproduce the issue with current nightly, WIN10, Firefox 77.0.1 (64)
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
@ReLater @ChristineWk are you clicking the Close
button in the footer, as opposed to the X
icon at the top?
admin-add_module.min.js?60415fa56b4bc7e8b11dbbf756b52527:1 Uncaught TypeError: Cannot read property 'click' of null
at HTMLButtonElement. (admin-add_module.min.js?60415fa56b4bc7e8b11dbbf756b52527:1)
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.
I make a clean installation and will come back.
@ReLater @ChristineWk are you clicking the
Close
button in the footer, as opposed to theX
icon at the top?
yes of course. Will also install nightly, but it takes time.
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
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.
So the error seems to happen here:
https://github.com/joomla/joomla-cms/blob/4.0-dev/build/media_source/com_cpanel/js/admin-add_module.es6.js#L54
And that means clickTarget
is not set, so it seems to fail here:
https://github.com/joomla/joomla-cms/blob/4.0-dev/build/media_source/com_cpanel/js/admin-add_module.es6.js#L43
Or maybe it goes already wrong here:
https://github.com/joomla/joomla-cms/blob/4.0-dev/build/media_source/com_cpanel/js/admin-add_module.es6.js#L36-L40
Status | New | ⇒ | Confirmed |
Confirmed.
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.
Didn't yet read above comments. Will do this later. At the moment FYI:
Installed now Nightly Fully from June22nd.
Also nothing installed yet.
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
Sorry, don't know why I got h1 Could someone change this? .....
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.
Sorry, don't know why I got h1 Could someone change this? .....
Done.
The h1
came from the =======
row directly following a text.
Tks @richard67 :-)
Confirm: clicked also the red "Close" button.
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?
Server=Apache 2.4 on Linux, PHP 7.3, MySQL 8. Broswer = Firefox 77.0.1 (64-Bit) on Windows 10.
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....
Don't think either.
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.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-06-23 17:45:44 |
Closed_By | ⇒ | alikon |
I'm sure we had this before