1

Hi i am working on gui extension want to add some jquery libraries but it is not loading in the cme ,CME got Crashed,i am using jquery and jqery ui js

i have this config

 <cfg:group name="Extension.Counter" merger="Tridion.Web.UI.Core.Configuration.Resources.CommandGroupProcessor" merge="always">
        <cfg:fileset>
         <cfg:file type="style">/Extrensions/Editors/jquery-ui.structure.css</cfg:file> 
         <cfg:file type="style">/Extrensions/Editors/jquery-ui.theme.css</cfg:file> 
         <cfg:file type="style">/Extrensions/Editors/jquery-ui.css</cfg:file> 
         <cfg:file type="script">/Extrensions/Editors/jquery-ui.js</cfg:file>
         <cfg:file type="style">/Extrensions/Editors/Counter.css</cfg:file>
         <cfg:file type="script">/Extrensions/Editors/jquery.js</cfg:file>
        <cfg:file type="script">/Extrensions/Editors/Counter.js</cfg:file>
          <cfg:file type="reference">Extrensions.Editors.Counter</cfg:file>
        </cfg:fileset>
        <cfg:dependencies>
          <cfg:dependency>Tridion.Web.UI.Editors.CME</cfg:dependency>
          <cfg:dependency>Tridion.Web.UI.Editors.CME.commands</cfg:dependency>
        </cfg:dependencies>
   </cfg:group>

What can be the reason to fail CME loading....why it is not loading js files and css for jquery ui if any one implemented same js in there Extensions please help thanks in advance

3

2 Answers 2

2

The order of your files in your <cfg:fileset /> element completely matters. This means you'll want to put the files that are used by the other resources at the top of your list. In your example, jQuery UI comes first, then jQuery... I'd imagine this would throw an error so you'd probably want to make sure that jQuery comes first.

Secondly you'll want to make sure you are adding your libraries correctly. See https://tridion.stackexchange.com/a/1689/9 for reference, you'll want to make sure you are dong something like window.$jq = jQuery.noConflict(true);. You'll also want to ensure that you are passing your $jq global to the jQuery UI library as well.

If you are still having issues after that, make sure to check the console log... you might get a better clue for debugging the issue.

Hope that helps!

1
<cfg:file type="reference"Extrensions.Editors.Counter</cfg:file>

<cfg:file type="reference">Extrensions.Editors.Counter</cfg:file>

Missing the closing tag after reference ?

Second. I wouldn't recommend you to use all those jquery libraries, they make the system slower.

4
  • then how to use the plugin code here is there any thing like bundling and minification in TRdion like in asp.net mvc
    – Pankaj786
    Commented Aug 25, 2014 at 11:53
  • jarnohenneman,Sorry but <cfg:file type="reference">Extrensions.Editors.Counter</cfg:file> is not issue may be i pasted wrong text now evry thing is right
    – Pankaj786
    Commented Aug 25, 2014 at 11:54
  • @Pankaj786 bundling and minification is automatically done for all the files in your fileset. But I think what Jarno ment was that you are adding a very heavy library (JQuery and JQuery UI) to your extension and you might want to consider not ding that. I'll add a comment about that to your main question, so you can edit the question and add the answer in there. Commented Aug 25, 2014 at 12:58
  • I presume the typo is 'known' /Extrensions/ should it not be /Extensions/ Commented Aug 25, 2014 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.