Problems with order of scripts added with addScript

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
jschmi
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Oct 08, 2008 7:14 am

Problems with order of scripts added with addScript

Post by jschmi » Wed Apr 17, 2013 6:45 am

hi,

it seems that the order adding scripts with addScript in Joomla 3.0 has been changed vice versa.
Whereas in Joomla1.5. to 2.5 scripts are appended to the array of scripts now with 3.0 they are placed on top of array. This causes serious problems with extension which need frameworks like mootools or jquery (which may have been already placed by "behaviour framework" or other extensions). As those are at the end of list and and new extension's scripts (which need the functionality from those already placed) will run into errors.
The only solution 'Im seeing, is to add the required scripts (as duplicates) together with the extension. I've tested this with my plugins - but it seems a bit stupid to add duplicate scripts because the system does wrong ordering.

 
 
Locked

Return to “Extensions for Joomla! 3.x”