Open stonebyter opened 2 months ago
This is not a joomla bug!!
The problem is that you are not creating the anchors correctly in your content
<div="audio">
is not valid html it must be <div id="audio">
Joomla will never create a url like the one you suggest it does as it has two itemid
index.php?option=com_content&view=article&id=6&itemId=130#videos&itemId=199
Sorry this was a typo. The div's on my page are correct, the same as you wrote <div id="audio">
.
Hmm regarding the URL: I suppose the itemId=130 is the top menu (Music) and the itemId=199 is the submenu (Video). When I check the link, there are really two itemId's and unfortunately the second one (199) is behind the #video for some reasons. The two itemId's are added by Joomla (or maybe by a plugin). I guess it is to track the the menu where the page was called from. In the menu is just the URL index.php?option=com_content&view=article&id=6#videos
. From my point of view, the additional itemId's are created by Joomla. I have no idea what else could modify the link...
Sorry!!!!!
You are quite correct - thats a new bug as it should not work like that at all
What you can do (and I tested myself this time) is to use the sef url instead of the non-sef url.
Thanks a lot for your help! I really do appreciate your work!
In Brian's last post there are 3 links that when clicked on just go to a blank page with "private user image". What is the point if you can't see them?
@gwstyles thats a limitation of the issues.joomla.org site. If you view it on github itself then you ccan see them - which obviously @stonebyter did https://github.com/joomla/joomla-cms/issues/43324
Thank you Brian.
Steps to reproduce the issue
Add an article 'Music' with two divs that should be navigable with an in-page anchor
<div id="video">
and<div="audio">
.Build a menu hierarchy: [Music] URL: index.php?option=com_content&view=article&id=6 -- [Videos] URL: index.php?option=com_content&view=article&id=6#videos -- [Audio]. URL: index.php?option=com_content&view=article&id=6#audio
Expected result
When selecting one of the submenus [Videos] or [Audio] the browser should scroll down to the
<div>
associated with the menu item.Actual result
The top of the page is displayed. The browser does not scroll down.
The cause of the problem is, that two itemIds are added to the link. The menu link created/enhanced by Joomla looks as follows: index.php?option=com_content&view=article&id=6&itemId=130#videos&itemId=199
If I manually correct the link and put #videos at the end it works: index.php?option=com_content&view=article&id=6&itemId=130&itemId=199#videos
System information (as much as possible)
Einstellung Wert PHP erstellt für MacBookPro 19.6.0 Darwin Kernel Version 19.6.0: Tue Jun 21 21:18:39 PDT 2022; root:xnu-6153.141.66~1/RELEASE_X86_64 x86_64 Datenbanktyp mysql Datenbankversion 10.4.27-MariaDB Datenbankzeichensatz utf8mb4_general_ci Datenbankverbindungszeichensatz utf8mb4_general_ci Datenbankverbindungsverschlüsselung Keine Datenbankserver unterstützt Verbindungsverschlüsselung Nein PHP-Version 8.2.0 Webserver Apache/2.4.54 (Unix) OpenSSL/1.1.1s PHP/8.2.0 mod_perl/2.0.12 Perl/v5.34.1 PHP-Interface für den Webserver apache2handler Joomla-Version Joomla! 5.1.0 Stable [ Kudumisha ] 16-April-2024 16:00 GMT Joomla Abwärtskompatibilität Plugin Aktiviert () Browsererkennung Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Additional comments