fbpx

Astroid 2.4 Landed with Joomla 4 Compatibility Download Now

Welcome, Guest
Username: Password: Remember me

TOPIC: Duplicated jQuery call cause an error

Duplicated jQuery call cause an error 7 months 3 weeks ago #19986

Hi there.
I'm not expert in this matter, but I found an exception thrown by console when opening pages pointing to jdbuilder component.

Uncaught TypeError: e.indexOf is not a function

In my case issue was caused by jquery called twice in the <head> of my page. One time by Joomla! and a second time from JDBUILDER
Hopefully there should be a check in JDB code or a backend param to choose if we want jQuery to be loaded by JDB or not.

I solved the problem commenting the following four lines in


Filename Builder.php
Location \plugins\system\jdbuilder\libraries\jdpagebuilder\

Line Text
748 echo '<script src="' . \JURI::root() . 'media/jdbuilder/js/jquery-3.4.1.min.js?v=' . JDB_MEDIA_VERSION . '"></script>';
749 echo '<script src="' . \JURI::root() . 'media/jdbuilder/js/jdb.noconflict.js?v=' . JDB_MEDIA_VERSION . '"></script>';
770 $document->addScript(\JURI::root() . 'media/jdbuilder/js/jquery-3.4.1.min.js', );
771 $document->addScript(\JURI::root() . 'media/jdbuilder/js/jdb.noconflict.js', );

I do not know if it's the right way, but it worked for me.
Hope it can help.
Luigi
Last Edit: 7 months 3 weeks ago by Rivoltella.
The administrator has disabled public write access.

Duplicated jQuery call cause an error 7 months 3 weeks ago #20008

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4063
  • Thank you received: 595
  • Karma: 104
@hitesh, could you take a look here please?

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

Duplicated jQuery call cause an error 7 months 3 weeks ago #20027

  • hitesh99raj
  • hitesh99raj's Avatar
  • Offline
  • Administrator
  • Posts: 60
  • Thank you received: 20
  • Karma: 4
Hi Luigi,
Thanks for using JD Builder and supporting us by reporting issue. We also want a permanent solution for jQuery conflicts, By commenting those lines will not help you for longer purpose. Can you please share a full screenshot with console error, Also I wanted to know the list of plugins you are using in you Joomla. Sometimes
Conflict occurs due to other Joomla extensions. If you do not want to upload screenshot publicly, You can share at This email address is being protected from spambots. You need JavaScript enabled to view it..

Thanks
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.310 seconds