: LimeLight datepicker js conflict with DocMan : sparksdr February 28, 2017, 07:14:20 PM I have an issue with DocMan where the folder list just shows Loading and never comes back. The JoomlaTools.com team looked at the site and said this:
"... the problem is not caused by DOCman but by the template. The template is creating a javascript conflict with the datepicker. The reason this is not happening on the previous version is because it didn't have the option to specify a date range for the search. The latest version does and your template conflict with the datepicker. I have checked your template configuration but don't seem to be able to disable the jQuery UI addons. I suggest you ask your template developer about this. The addons are loaded as part of the following file included in the template: http://template.devlab.me/templates/lime_light/js/jquery/jquery-ui-addons.js" They also refer to some best practice with Jquery not being followed in the template, but I don't have details from them on that. Can you please tell me how to fix this conflict? I will PM you with the site details and access. ALSO NOTE: I paid you to customize LimeLight for me (just had you move around the menu and make simple changes like that...should not affect this issue but wanted to let you know.) Thank you for your help! : Re: LimeLight datepicker js conflict with DocMan : sparksdr February 28, 2017, 07:35:36 PM I just sent the access details to MikeK, since I see his name in other posts doing support. Was not sure where to send it.
: Re: LimeLight datepicker js conflict with DocMan : mikek March 01, 2017, 08:30:26 AM Hello,
You cannot remove Jquery-UI, nor would that cause a javascript conflict. All Jquery-UI does is extend the default Jquery library by adding additional functions, mostly effects. This is a default script that comes from Jquery and works in conjunction with the default Jquery library that comes with Joomla. If you remove it you will loose multiple effects, eg: the drop down on the main menu, as well as others. This is something they will need to fix, as their script should be able to work with Jquery scripts present on the page. Also, on the link you provided, there are no javascript errors being produced on the page at all, so I am not sure why they are pointing to a javascript problem. : Re: LimeLight datepicker js conflict with DocMan : sparksdr March 01, 2017, 07:32:48 PM Thanks Mike. I put a reply into the module developer and will see what they say.
: Re: LimeLight datepicker js conflict with DocMan : sparksdr March 02, 2017, 07:13:28 AM Mike, Here is the reply from the module developer. As I read it, they are saying that best practice is for the template designer to build your jQuery UI to load only the components you actually need. I'm kind of stuck in the middle here. Comments?
FROM THE MODULE DEVELOPER: "The page is throwing a JS error because their datepicker script is loaded after ours. He says there isn't a JS error, but I'm not sure how his looking or if he even is. The problem with templates is always the same. Designers add assets to their templates without taking into consideration that components must then deal with any conflict when adding their assets. Let's not forget that it is the components that add content to templates, not the other way around. The template developer says that he's adding the jQuery UI library and that there are effects that you are going to be missing by removing them. They must know that when adding assets to a template they should be adding what they actually need. A template on its own does not render calendars, so why are they including the datepicker which is overriding ours when they actually do not use it at all? jQuery UI can be built so that they include the components they actually need. This is good because: They are able to keep the library size at its minimum. They avoid messing up with other extensions that will include the same assets. To avoid this from happening again we are going to namespace our datepicker library so that both may coexists, but again, this is us covering for other people's mistakes. A template shouldn't be loading the datepicker library as they do not make use of it on their own. Components that need it on the other hand, will include it as they cannot expect that a template will. Your template provider may easily fix this by compiling a jQuery UI library that doesn't include the datepicker plugin. This will fix the issue for you. Our future releases will cover for this case scenario which is not at all our wrong doing." : Re: LimeLight datepicker js conflict with DocMan : mikek March 02, 2017, 05:50:43 PM Hello,
They are partially correct in that we do not use the datepicker function, however what is being describing is rarely how Jquery UI is used. Typically the entire library is used when calling it so that all functions are available. Whether the function is called or not though should not make any difference, if their script is conflicting when a default Jquery UI function name is present, then that is a problem with their script; which is why they are stating they are going to rename it. The problem is they are using function names that are named the same as a Jquery UI function. That is an issue with their script due to their naming conventions. Their scripts should be tested with at least the popular libraries like Jquery. You can try using the attached modified js files. I have gone through and removed datepicker from them. I cannot guarantee that these will not cause other issues as these are now severely modified files. If it still does not work they will need to correct their function names and test with Jquery present on the page. Make sure you clear your browser cache after you update the files. : Re: LimeLight datepicker js conflict with DocMan : sparksdr March 02, 2017, 06:27:37 PM Thank you Mike!
|