Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > jQuery CMSDesk conflict View modes: 
User avatar
Member
Member
beau.cowan-rrpartners - 8/20/2013 7:21:30 PM
   
jQuery CMSDesk conflict
We are creating a unique site that works fine when the CMSDesk is set to Live Site mode, but when on Edit mode, we get a message of:
TypeError: $ is not a function

We are using the most recent version of jQuery, and we believe that it is conflicting with the version in the CMSDesk. As a result, we would like to find a way to disable this in the Edit mode.

I don't want to take away from the general functionality, as we will need to be able to access the Form and Properties tabs of the documents we are creating.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 8/21/2013 6:22:42 PM
   
RE:jQuery CMSDesk conflict
Hello Beau,

I've written 2 KB articles in the past and I believe that they could help you especially in this situation so please take a look at them:
1. Small workaround to use simple jQuery “$” quotation with your custom JS
2. How to register and use the native Kentico jQuery library

Best Regards,
Martin Danko

User avatar
Member
Member
beau.cowan-rrpartners - 8/22/2013 12:23:23 PM
   
RE:jQuery CMSDesk conflict
Thanks, the other programmer who was working on this tried that method and it didn't work at first, which is why I posted this article.

Then I found out that a day after I posted this he found out where to place it and didn't tell me that he got it working... aklsdjvnasjklnasuin34tnuibvhjabtfhjbmashedpotatoes!!!!

Ah, the life of a programmer!

Thanks again for your help. If we wanted to upgrade the jquery.core to the most recent version of jQuery, would it break anything in the CMS or cause any issues, then we could use the current jQuery files instead?

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 8/23/2013 4:07:32 PM
   
RE:jQuery CMSDesk conflict
Hello Beau,

Yes, I would not recommend you to change the Kenticos core jQuery library due to some API changes in the jQuery latest version. Unfortunately, it can completely break the functionality of CMS Desk (I've already experienced this issue with one customer in the past) but in the next version of Kentico the jQuery library should be upgraded to the latest version.

Anyway, I'm really glad that your programmer have already found the right way to fix it :)

Best Regards,
Martin Danko