Hi,
I updated a website from Joomla 3 to Joomla 5.
We have the tabs & accordions extension. We use the tabs (like in the Joomla 3 Version). Sometimes we have in two tabs a phoca gallery. Then we have a problem with the first gallery.The image does not open in the modal. If you click on the next tab, now the modal with the image opens. If you swith to the tab with the second gallery everything works fine.
It seems to be a javascript conflict:
script.min.js?c00f49:16 Uncaught (in promise) SyntaxError: Failed to execute 'querySelector' on 'Document': '#oberflaechen&gid=1&pid=1' is not a valid selector.
at Object.getItemAndAnchorById (script.min.js?c00f49:16:23)
at Object.scrollToNestedAnchor (script.min.js?c00f49:19:193)
at Object.init (script.min.js?c00f49:5:333)
at HTMLDocument.<anonymous> (script.min.js?c00f49:22:395)
It is the file /media/tabsaccordions/js/script.min.js
In Joomla 3 with the old tab extension and phoca gallery there was no problem.
Looks like the urls are not being changed/handled correctly. Something is adding '&gid=1&pid=1' to the urls after the hash. Probably the Phoca gallery.
Yes. But I am wondering why it generates an error in the first gallery and the second one is working proberly.
Jan from Phoca has no idea too.
If you need a login to see the error, please let me know.
Thanks
Nadja
Yeah, the issue is with that gallery, by the looks of it.
As soon as you click on a an image, it is adding that weird &gid=1&pid=1 to the hash, and not replacing it.
I can't help you with this, the issue is with that gallery extension.
I did add some extra checks to the Tabs & Accordions script to deal with some of this stuff caused by other extensions. But that is a bit of a bandaid on someone else's problem.
Please try the latest development version from:
regularlabs.com/development-releases