Cb Content Module = Broken yootheme ZOO

12 years 10 months ago #166761 by krileon
Replied by krileon on topic Re: Cb Content Module = Broken yootheme ZOO
Looks like mootools is conflicting with jQuery. Please instruct the extension developer to operator mootools in a noconflict mode (assuming it has one). CB operates jQuery in noConflict. The problem is they're both fighting for control of $, which they both can't use it at the same time. Typically there's no issue with conflicts due to jQuery loading in no-conflict, but no idea how your extension is utilizing mootools or jQuery if both.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 10 months ago #166768 by onlinesince79
Replied by onlinesince79 on topic Re: Cb Content Module = Broken yootheme ZOO
Hi Krileon,

The zoo extension doesnt use Mootools, only Jquery. Here is the info re Jquery:

Prevent multiple jQuery instances

Now you might ask, why aren't there any conflicts with jQuery. Well, we can't be sure of that of course. But we'll try to run along with the Joomla community here. There is an ongoing discussion on how to prevent those conflicts from happening. We have already taken steps and measures by implementing a widely accepted solution. We register through JApplication whether jQuery is loaded or not. In case your extension loads the jQuery library you can use the following code snippet to prevent our ZOO extension or Warp template from loading it twice:

JFactory::getApplication()->set('jquery', true);
We'll also ensure to keep an eye on this issues future progress.

Finally as always, take it for a ride... We hope you like it :)

PS: For more information about Joomla and jQuery take a look at the "Best practices for extension developers using jQuery" discussion on people.joomla.org

Also:


JQUERY IS OUR NEW DEFAULT JAVASCRIPT LIBRARY FOR ZOO AND THE WARP FRAMEWORK!

Today we got some exciting news for all the JavaScript junkies out there. We changed the default JavaScript library of our Warp 5.5 based templates and our ZOO extension to jQuery. Yep, you heard right ;-) All our old MooTools based JavaScripts are completely rewritten for jQuery and all Warp based templates and the ZOO make use of it. You may ask why did this happen? Well, here is the story!

ZOO 2.2 Release and JS Conflicts
First of all we put a lot of effort in our Warp 5.5 JavaScripts to support the different MooTools versions. In one of our last blog posts we pointed out that the Warp framework auto-detects if your are using MooTools 1.1 or the MooTools 1.2 MTupgrade plugin and includes the compatible scripts to match your MooTools version. This was quite a lot of work. Next up was the ZOO 2.2 release which made all ZOO JavaScripts depend on MooTools 1.2. Unfortunately it turned out that requiring MooTools 1.2 was quite a little disaster. Many people complained that their websites stopped working because of JavaScripts conflicts. To solve this issue we considered to deliver ZOO with two different script versions for MooTools 1.1 and 1.2 like we did with our Warp 5.5 theme framework. But we also thought about the recently released MooTools 1.3. We would have to optimize our scripts again because most likely it will be the default JS library of Joomla 1.6. Don't get this wrong, it is great if Joomla 1.6 would make use of the latest MooTools version. The real problem is that Joomla 1.5 will most likely not be updated to the latest MooTools version. Even the MooTools 1.2 MTupgrade plugin is disabled by default. Not to mention that many extension developers still use MooTools 1.1 and have not updated there JavaScripts to MooTools 1.2.

At the end we would have to support and maintain three different versions of our scripts for MooTools 1.1, 1.2 and 1.3 for all our templates and extensions which is really time consuming and we rather spend this time adding new features. To keep it short: We skipped MooTools for jQuery. The big advantage is that we only have to support one JavaScript library and not three. This is awesome. jQuery will also work with any MooTools version and will cause less conflicts. We like MooTools and it is still a great library, no doubt, but we had to keep things simple.


www.yootheme.com/blog/item/root/warp-zoo-and-jquery

Where now :blush:

Please Log in to join the conversation.

12 years 10 months ago #166888 by krileon
Replied by krileon on topic Re: Cb Content Module = Broken yootheme ZOO
We don't use CMS specific API for altering the head. While your extension works individually on a single CMS; CB works all the back to Mambo. So using Joomla API to load jQuery will not stop it from conflicting with CB. Your extension needs to operator in noConflict mode, which will allow them to use jQuery. or whatever they define their jQuery selector as instead of $. which would prevent conflicts.

We'll be implementing a deeper noConflict mode into CB later, but that would only project CB. Other developers need to be using noConflict mode or they'll have issues. Templates should also avoid loading any JS libraries and if they have to it should be done dynamically by first checking the head to ensure it doesn't already exist.

There's nothing we can do regarding the Zoo extensions. CB already protects it self from conflict, they must do the same.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 10 months ago #167061 by onlinesince79
Replied by onlinesince79 on topic Re: Cb Content Module = Broken yootheme ZOO
HI Krileon,

Thank you for your detailed response. It is unfortunate that certain standards aren't being followed in the joomla community, it seems if they were, many issues would be avoided. I have relayed the information to the zoo developers although I think there only suggestion is to use JFactory::getApplication()->set('jquery', true); which you say wont help.

As a work around could you please assist me with this. I am also a CBSUBS subscriber and I understand I can choose what modules load on a per page basis.

Can you please tell me how I can get a link from the main menu to load in a new window/same window without any modules.

Many thanks

Please Log in to join the conversation.

12 years 10 months ago - 12 years 10 months ago #167088 by krileon
Replied by krileon on topic Re: Cb Content Module = Broken yootheme ZOO

Thank you for your detailed response. It is unfortunate that certain standards aren't being followed in the joomla community, it seems if they were, many issues would be avoided. I have relayed the information to the zoo developers although I think there only suggestion is to use JFactory::getApplication()->set('jquery', true); which you say wont help.

Most devs don't use Joomlas API, but instead their own. Asynchronously (not needed for jQuery if noConflict is used) of JS libraries for instance is highly versatile, lightway, and cross-CMS capable; wherein Joomla API is restricted to version, compatibility, bugs, etc.. Each development team has their own standards, but we absolutely can not be CMS dependent as we operator off multiple platforms. That would require us to implement up to 4 different use cases for EVERY CMS specific line of code.. CB would be nearly 3 times larger then it is now if that was the case.

As a work around could you please assist me with this. I am also a CBSUBS subscriber and I understand I can choose what modules load on a per page basis.

You can protect modules on a plan by plan basis using the CBSubs Content integration. Once installed simply edit your plans then on the Extension tab found on the Integrations tab select what modules you want to protect.

Can you please tell me how I can get a link from the main menu to load in a new window/same window without any modules.

Don't understand, CB nor CBSubs provides custom URLs that enable/disable certain modules.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 10 months ago - 12 years 10 months ago #167090 by onlinesince79
Replied by onlinesince79 on topic Re: Cb Content Module = Broken yootheme ZOO
Thanks for that,

Re the modules, I am aware you can show or hide modules / components dependent on plan, which I have implemented, I was wondering if there was a way a link could be controlled too.

So there is no solution for 'custom URL' to not display modules when clicked?

I wanted to get around the jquery conflict by loading zoo on a seperate page without cb content module.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.281 seconds

Facebook Twitter LinkedIn