Keyword

Frontend Add Item broken because of wrong JS order on head

  • Carlos
  • Carlos's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 month ago #151001 by Carlos
Hello.

The K2 form for adding a new item from the frontend is not working correctly because the scripts on <jdoc:include type="head" /> on component.php are loading in the wrong order.

It loads in this order:

jQuery UI
K2
Mootools
jQuery

When it should be:

Mootools
jQuery
jQuery UI
K2

How can this order be set correctly?

I've coppied the head HTML output of the K2 modal window and coppied it in component.php and it works as it should, but I don't think this is the best way to do it.

Thanks!.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 month ago #151014 by Krikor Boghossian
Replied by Krikor Boghossian on topic Frontend Add Item broken because of wrong JS order on head
Hello Carlos,
Which version of Joomla! and K2 are you using?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Carlos
  • Carlos's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 month ago #151036 by Carlos
Hi.

It's Joomla 3.4.8 and K2 2.6.9

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 month ago #151047 by Krikor Boghossian
Replied by Krikor Boghossian on topic Frontend Add Item broken because of wrong JS order on head
You are up to date.
Double check K2's jQuery settings. These are located in the parameters section.

You have to option to load or not load both jQuery or jQueryUI.
Joomla! 3.x is also loading jQuery which might solve this issue.

If these versions are loaded there by the template or a 3rd party extension you can easily solve this issue with an extension called jQuery Easy.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Carlos
  • Carlos's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 month ago #151282 by Carlos
I tried changing K2 setting, using JQuery Easy (and other similar plugins) and nothing worked.

I ended up deleting <jdoc:include type="head" /> from component.php and adding the code there manualy in the correct order.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 month ago #151289 by Krikor Boghossian
Replied by Krikor Boghossian on topic Frontend Add Item broken because of wrong JS order on head
Brute force does the trick :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum