?
avatar JackJoeJack
JackJoeJack
21 Jul 2020

Steps to reproduce the issue

At the back-office, on any page that shows the side menu, and it is not toggled/reduced.
At the side menu, click the "Content" item, it reveals its sub-items.
Click the "Articles" item.

screen shot 2020-07-21 at 09 23 54

Expected result

When the "Articles" page loads, it should keep the "Content" side menu open (showing the "Articles", "Categories", etc).

screen shot 2020-07-21 at 09 24 14

Actual result

When the "Articles" page loads, the side menu has collapsed to its default (closed) state (the "Content" side menu only has siblings shown, not the chidren, and most importantly, the active menu is hidden).

screen shot 2020-07-21 at 09 24 46

System information (as much as possible)

MacOS 10.14.6; screen size: 1920 x 1080; using MAMP 5.2 (PHP 7.2); Joomla Beta 3 nightly build (Tuesday, 21 July 2020 02:00:26 UTC); tested in the following browsers: Google Chrome Version 84.0.4147.89 for Mac (the latest), Safari Version 12.1.2 (14607.3.9) Mac, Firefox 78.0.2 (64-bit) Mac, Microsoft Edge Version 79.0.309.65 Mac.

Additional comments

The same wrong behaviour happens with any other component.
This was tested in a desktop only.
Standard install of Joomla, and no changes made.

Votes

# of Users Experiencing Issue
0/1
Average Importance Score
5.00

avatar JackJoeJack JackJoeJack - open - 21 Jul 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Jul 2020
avatar toivo
toivo - comment - 21 Jul 2020

Just posted the following to the Forum topic The side menu for the components is always hidden?

"Just connected from MacBook Pro to the latest NB hosted in Wampserver in the LAN. Both Chrome 84 and Safari 13.1.1 opened the New Article window and used the whole width of the screen but as soon as the article was closed, the open sub menu was displayed, showing the active item.

Is it possible that the issue occurs only in the MAMP environment?"


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

avatar JackJoeJack
JackJoeJack - comment - 21 Jul 2020

You're right! I just tried on an external server, and it works!
Who would imagine this would be related to the server?
Even so, could it be any PHP module missing? I'm trying to find out...


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

avatar JackJoeJack
JackJoeJack - comment - 21 Jul 2020

Ok, I found out what is the problem!

The path name cannot contain any uppercase letters!

Just to explain better, I have installed Joomla 4 into a localhost domain that I have named "sandbox.dev" (this is in MAMP, and with a custom domain that I control with my hosts file), and extracted the zip into the root of this domain, so that to access it, I just have to type: https://sandbox.dev/Joomla_4.0.0-beta3-dev-Development-Full_Package/administrator/

If I tried to browse the admin, it would have the bug that I reported.

After some digging, I discovered that the domain folder cannot have uppercase characters, and so if I try:
https://sandbox.dev/joomla_4.0.0-beta3-dev-development-full_package/administrator/

It works correctly and the side menu shows the active sub-menus when loading the pages!


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

avatar PhocaCz
PhocaCz - comment - 21 Jul 2020

Hi,

confirmed. I am testing it on localhost.

When:

a) localhost/J4/administrator ... this bug occurs

when:

b) localhost/j4/administrator ... everything is OK.

(J4 => j4) ... problem is uppercase in path

Jan

avatar infograf768
infograf768 - comment - 22 Jul 2020

Shall we close this?

avatar JackJoeJack
JackJoeJack - comment - 22 Jul 2020

Shall we close this?

This bug is still a bug, maybe report that the uppercase path can cause this?

avatar infograf768
infograf768 - comment - 22 Jul 2020

Well, for me, it is NOT a joomla bug... This may happen on any site with any CMS. It is known that using Uppercase in links following the domain name may create issues, including 404.

avatar infograf768
infograf768 - comment - 22 Jul 2020

Maybe we can correct that in the js. Not sure.

avatar PhocaCz
PhocaCz - comment - 22 Jul 2020

This is very interesting issue. I have been testing on localhost for over 15 years. On Linux and Windows. On windows, I use capital letters in projects and I've never had such a problem.

If I had problems with 404, then it would be logical to focus on that. The insidiousness of this problem, however, is that it is not actually related to the URL directly - no 404, no error, no "server not found", etc.

Basically no one expects that marking an active menu item doesn't work due to an URL when the URL itself works correctly. Really hard to say.

avatar infograf768
infograf768 - comment - 22 Jul 2020

Some one has to dig into the js to try to solve this.

avatar JackJoeJack
JackJoeJack - comment - 22 Jul 2020

This is very interesting issue. I have been testing on localhost for over 15 years. On Linux and Windows. On windows, I use capital letters in projects and I've never had such a problem.

If I had problems with 404, then it would be logical to focus on that. The insidiousness of this problem, however, is that it is not actually related to the URL directly - no 404, no error, no "server not found", etc.

Basically no one expects that marking an active menu item doesn't work due to an URL when the URL itself works correctly. Really hard to say.

True, I found out about it after a lot of digging, and testing PHP modules on/off. It was a lucky guess that made me check the path naming (periods, dashes, underscore, etc). Indeed there is no javascript error, and that made it even more difficult to spot.

avatar infograf768
infograf768 - comment - 22 Jul 2020

Maintainers (@HLeithner @richard67 ) found the solution in the admin-menu.js
Patch coming soon.

avatar PhocaCz
PhocaCz - comment - 22 Jul 2020

I am not a Javascript expert, so therefore, I would rather not create PR but if I change following file:

media/mod_menu/js/admin-menu.es6.js (minified: media/mod_menu/js/admin-menu.min.js)

on line cca. 124

FROM:
if (currentUrl === link.href) {

TO:

if (currentUrl.toLowerCase() === link.href.toLowerCase()) {

everythings is working OK.

(currentUrl includes real URL, link.href includes URL in lowercase format)

EDIT: I didn't see the previous comment from @infograf768 about solution by maintainers. Now I see it, great to heart it.

Thank you.

avatar infograf768
infograf768 - comment - 22 Jul 2020

In fact, we choose to take off toLowercase() from currentUrl.
will do patch tomorrow

avatar Fedik
Fedik - comment - 22 Jul 2020

hm, try to change here

menuToggle.addEventListener('click', () => {
wrapper.classList.toggle('closed');
menuToggleIcon.classList.toggle('fa-toggle-on');

from:

menuToggle.addEventListener('click', () => {

to:

menuToggle.addEventListener('click', (event) => {
  event.preventDefault();
avatar infograf768 infograf768 - change - 23 Jul 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-07-23 06:30:26
Closed_By infograf768
avatar infograf768 infograf768 - close - 23 Jul 2020
avatar infograf768
infograf768 - comment - 23 Jul 2020

@Fedik
Your proposal does not work here.
PR here #30170

Add a Comment

Login with GitHub to post a comment