[ALLOW FC TO LOAD jQUERY] Wrong (jQuery) script loading sequense in Flexicontent

More
10 years 1 week ago - 10 years 1 week ago #59869 by Romani
Hello, cannot really tell is it bug or not but that the story
Just found out that after update tov3.0.10 from 3.0.9 Firefox started to show a lot of javascript errors for me

Like ReferenceError: jQuery is not defined
select2.min.js:21:1
ReferenceError: jQuery is not defined
select2_locale_ru.js:23:1
ReferenceError: jQuery is not defined
tmpl-common.js:204:1


Checked page contents and found out this
Code:
<script src="/media/system/js/core.js" type="text/javascript"></script> <script src="/components/com_flexicontent/librairies/select2/select2.min.js?3.5.4" type="text/javascript"></script> <script src="/components/com_flexicontent/librairies/select2/select2_locale_ru.js?3.5.4" type="text/javascript"></script> <script src="/components/com_flexicontent/assets/js/tmpl-common.js?80ec209b0f18ff06630dcca218e9e368" type="text/javascript"></script> <script src="/components/com_flexicontent/assets/js/jquery-easing.js?80ec209b0f18ff06630dcca218e9e368" type="text/javascript"></script> <script src="/media/jui/js/jquery.min.js" type="text/javascript"></script> <script src="/media/jui/js/jquery-noconflict.js" type="text/javascript"></script> <script src="/media/jui/js/jquery-migrate.min.js" type="text/javascript"></script> <script src="/media/jui/js/bootstrap.min.js" type="text/javascript"></script>
No surprise there is errors - Flexicontent started to load its script much before Joomla loads its jQuery, so there is error.
I pretty much sure i havent seen that in previous Flexicontent version and there was not recent changes in other extension nor in Joomla version (3.4.8, latest).
To tell truth i really dunno how to change this order, any ideas (updated to 3.0.11) - same problem

P.S. Need to add, that jQuery option in Flexicontent configuration is set to Manually in Frontend. Why? Because i dont see a reason to load jQuery from Flexicontent since there is system one. Before that worked fine, but not now.

Ok, checked previous version - it really had different order
Code:
<script src="/media/system/js/core.js" type="text/javascript"></script> <script src="/media/jui/js/jquery.min.js" type="text/javascript"></script> <script src="/media/jui/js/jquery-noconflict.js" type="text/javascript"></script> <script src="/media/jui/js/jquery-migrate.min.js" type="text/javascript"></script> <script src="/media/jui/js/bootstrap.min.js" type="text/javascript"></script> <script src="/components/com_flexicontent/librairies/select2/select2.min.js" type="text/javascript"></script> <script src="/components/com_flexicontent/librairies/select2/select2_locale_ru.js" type="text/javascript"></script> <script src="/components/com_flexicontent/assets/js/tmpl-common.js" type="text/javascript"></script> <script src="/components/com_flexicontent/assets/js/jquery-easing.js" type="text/javascript"></script>
Last edit: 10 years 1 week ago by ggppdk.

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

More
10 years 1 week ago - 10 years 1 week ago #59943 by gardenho
I don't know about the rest, but when the jquery is set to 'manual in frontend' that is to disable it in flexicontent that way it does load from joomla. It says this in the tooltip when you hover there.
Last edit: 10 years 1 week ago by ggppdk.

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

More
10 years 1 week ago - 10 years 1 week ago #59944 by ggppdk
Hello
Code:
but when the jquery is set to 'manual in frontend' that is to disable it in flexicontent that way it does load from joomla.
wrong statement in 2 ways

1. FLEXIcontent always calls Joomla API to load jQuery and jQuery UI basic JS
2. if some other extension or if the administrator does not load jQuery then jQuery will not be loaded at ALL

- if you set to manually, then it is your responsibility to load jQuery and jQuery UI appropriately

@Romani
have you set load jQuery to "manually at frontend" ? (component parameter)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!
Last edit: 10 years 1 week ago by ggppdk.

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

More
10 years 1 week ago - 10 years 1 week ago #59945 by Romani
Yes, it was set to load jQuery manually. Now and prior of that.
Last edit: 10 years 1 week ago by ggppdk.

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

More
10 years 1 week ago - 10 years 1 week ago #59946 by ggppdk
Hello

if you set to "manually" then jQuery loaded order is no longer controlled by FLEXIcontent

the fact that with previous version of FLEXIcontent the jQuery loaded in correct order
- is due to indirect effect of FLEXIcontent code
e.g. we call function NNN of Joomla that triggers code to load jQuery
- or due to other site configuration / other site extensions running

If you want jQuery to be loaded in correct order by FLEXIcontent the you must allow FLEXIcontent to load it


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!
Last edit: 10 years 1 week ago by ggppdk.

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

More
10 years 1 week ago #59948 by Romani
Well, i see, need to investigate if deeper. But fact is that version change of Flexicontent is only change was made by me, so basically its change in Flexi have effect.

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

More
10 years 1 week ago #59949 by ggppdk
When you set "Load manually" some non FLEXIcontent code must load jQuery at an early point

- when you set to manually you must do it manually,
the parameters is for users that need it and who know how to load jQuery manually

e.g.
some users will disable jQuery / jQuery UI loading in ALL extensions
and add loading of it at the TOP of your index.php of the JOOMLA Template


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

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

More
10 years 1 week ago #59953 by Romani

When you set "Load manually" some non FLEXIcontent code must load jQuery at an early point

And it actually is, but for some reason Flexi trying (now) to load all other enabled scripts before everything.

Oh well, its getting weirder and weidrer.
So, i enabled jQuery in Flexi and...
This is how its works now
Code:
<script src="/media/system/js/core.js" type="text/javascript"></script> <script src="/media/jui/js/jquery.min.js" type="text/javascript"></script> <script src="/media/jui/js/jquery-noconflict.js" type="text/javascript"></script> <script src="/media/jui/js/jquery-migrate.min.js" type="text/javascript"></script> <script src="/media/jui/js/jquery.ui.core.min.js" type="text/javascript"></script> <script src="/media/jui/js/jquery.ui.sortable.min.js" type="text/javascript"></script> <script src="/components/com_flexicontent/librairies/jquery/js/jquery-ui/jquery.ui.dialog.min.js" type="text/javascript"></script> <script src="/components/com_flexicontent/librairies/jquery/js/jquery-ui/jquery.ui.menu.min.js" type="text/javascript"></script> <script src="/components/com_flexicontent/librairies/jquery/js/jquery-ui/jquery.ui.autocomplete.min.js" type="text/javascript"></script> <script src="/components/com_flexicontent/librairies/select2/select2.min.js?3.5.4" type="text/javascript"></script> <script src="/components/com_flexicontent/librairies/select2/select2_locale_ru.js?3.5.4" type="text/javascript"></script> <script src="/components/com_flexicontent/assets/js/tmpl-common.js?d0fc6d41e9b73563d273d86f5a36be50" type="text/javascript"></script> <script src="/components/com_flexicontent/assets/js/jquery-easing.js?d0fc6d41e9b73563d273d86f5a36be50" type="text/javascript"></script>

I see its probably dont very much of fault of Flexicontent, because i literally cannot determine from where <script src="/media/jui/js/jquery.min.js" type="text/javascript"></script> is loading - no trace in template, its loading even with all plugins and modules disabled.
Still, after enabling jQuery in Flexi order changed significantly, Flexi no longet tries to load its script ahead everything.
Anyway, only solution i found so far to stop all that mess is to install disable jQuery in Flexi, install eorsis jQuery plugin, configure it load jQuery and let it kill all other attempts to load same lib.

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

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save