5

I'm trying to build a GUI Extension to 2011. One of my requirements is that there be a 'settings' page for this extension that a Tridion user can access from the Ribbon.

When Tridion loads, the GUI does not complete loading, and the console shows this error message:

Unable to get unique id for element. Dashboard_v6.1.0.55920.8_.aspx:22

Below is a snippet from my configuration file. I'm trying to understand what the issue is and where it originates. Is it my configuration, my JavaScript, or both?

<ext:deckpages>
       <ext:add>
         <ext:extension pageid="ToolsPage" name="CrocodocSettingsPage" assignid="CrocodocSettingsPage">
           <ext:control>~/Controls/CrocodocSettings.ascx</ext:control>
           <ext:pagetype>crocodoc.SettingsPage</ext:pagetype>
           <ext:dependencies>
             <cfg:dependency>crocodoc.Resources.Settings</cfg:dependency>
           </ext:dependencies>
         <ext:apply>
           <ext:view name="DashboardView">
             <ext:control id="DashboardToolbar" />
           </ext:view>
         </ext:apply>
         </ext:extension>
       </ext:add>
     </ext:deckpages>
     <ext:tabpages />
     <ext:toolbars />
     <ext:ribbontoolbars>
       <ext:add>
         <ext:extension pageid="ToolsPage" groupid="MaintenanceGroup" name="croc" assignid="croc">
           <ext:command>crocodoc</ext:command>
           <ext:title>Crocodoc Configuration</ext:title>
           <ext:dependencies>
             <cfg:dependency>crocodoc.Resources.Settings</cfg:dependency>
           </ext:dependencies>
         <ext:apply>
           <ext:view name="DashboardView">
             <ext:control id="DashboardToolbar" />
           </ext:view>
         </ext:apply>
         </ext:extension>
       </ext:add>
     </ext:ribbontoolbars>
   </ext:editorextension>
 </ext:editorextensions>
    <ext:dataextenders/>
</extensions>

crocodoc.Resources.Base

Update

I've updated the configuration, But I'm still having the same error. It's on line 22. The Console shows me these full details of the object:

anonymous(object{..}) anonymous(object{..}) k(object{..}) j() anonymous(array[2]) c() anonymous(function: anonymous(){var c="IsPopupBlocker",b="Non fatal error: {0}";if($display._viewConstructor!=null){$display._view=new >$display._viewConstructor;var a=window.opener;try{a&&a.Tridion&&a.Tridion.Controls&&a.Tridion.Controls.Popup&&a.Tridion.Controls.ExternalPopup.registerView($display._view,window)}catch(d){$log.message(b,d.message)}var a=window.parent;try{a&&a.Tridion&&a.Tridion.Controls&&a.Tridion.Controls.Popup&&a.Tridion.Controls.ModalIframePopup.registerView($display._view,window)}catch(d){$log.message(b,d.message)}Type.isFunction($display._view.initialize)&&$display._view.initialize();$display.fireEvent("start")}$log.debug("DisplayController.start: Time taken to load and initialize everything was {0}ms.",Date.getTimer());if($dom.isChrome&&opener&&!window.outerHeight){try{if(opener.$display){opener.$display.showModalError($localization.getCoreResource(c));return}}catch(d){}$display.showError($localization.getCoreResource(c))) anonymous() anonymous() anonymous("Tridion.Cme.Views.DashboardBase", "initialize") anonymous() anonymous() anonymous(array[1], "Tridion.Controls.Stack") anonymous("Unable to get unique id for element.") Dashboard_v6.1.0.55920.8_.aspx:22

<ext:deckpages>
      <ext:add>
        <ext:extension pageid="ToolsPage" name="CrocodocSettingsPage" assignid="CrocodocSettingsPage">
          <ext:control>~/Controls/CrocodocSettings.ascx</ext:control>
          <ext:pagetype>crocodoc.SettingsPage</ext:pagetype>
          <ext:dependencies>
            <cfg:dependency>crocodoc.Resources.Settings</cfg:dependency>
          </ext:dependencies>
          <ext:apply>
            <ext:view name="DashboardView" />
          </ext:apply>
        </ext:extension>
      </ext:add>
    </ext:deckpages>
    <ext:tabpages />
    <ext:toolbars />
    <ext:ribbontoolbars>
      <ext:add>
        <ext:extension pageid="ToolsPage" groupid="MaintenanceGroup" name="croc" assignid="croc">
          <ext:command>crocodoc</ext:command>
          <ext:title>Crocodoc Configuration</ext:title>
          <ext:dependencies>
            <cfg:dependency>crocodoc.Resources.Settings</cfg:dependency>
          </ext:dependencies>
          <ext:apply>
            <ext:view name="DashboardView" />
          </ext:apply>
        </ext:extension>
      </ext:add>
    </ext:ribbontoolbars>
6

As it turns out, my issue was further up in my configuration file. (maybe I should post the whole thing next time)

The issue was actually in the resource groups which I had set up.

down in my extension to the tools page I had a reference to crocodoc.Resources.Settings

<ext:extension pageid="ToolsPage" groupid="MaintenanceGroup" name="Crocodoc Configuration" assignid="crocodoc">
          <ext:command>crocodoc</ext:command>
          <ext:title>Crocodoc Configuration</ext:title>
          <ext:dependencies>
            <cfg:dependency>crocodoc.Resources.Settings</cfg:dependency>
          </ext:dependencies>
          <ext:apply>
            <ext:view name="DashboardView" >
              <ext:control id="DashboardToolbar" />  
            </ext:view>
          </ext:apply>
        </ext:extension>

The issue traces back to the dependencies I had written for my resource group:

<cfg:group name="crocodoc.Resources.Base">
  <cfg:fileset>
    <cfg:file type="script">/Scripts/jquery.min.js</cfg:file>
  </cfg:fileset>
</cfg:group>
<cfg:group name="crocodoc.Resources.Settings">
  <cfg:fileset>
    <cfg:file type="script">/Scripts/CrocodocSettings.js</cfg:file>
    <cfg:file type="style">/Styles/crocodoc.css</cfg:file>
  <cfg:file type="reference">crocodoc</cfg:file>
  </cfg:fileset>
<cfg:dependencies>
  <cfg:dependency>crocodoc.Resources.Base</cfg:dependency>
  <cfg:dependency>Tridion.Web.UI.Editors.CME</cfg:dependency>
  <cfg:dependency>Tridion.WebUI.Editors.CME.commands</cfg:dependency>
</cfg:dependencies>
</cfg:group>

The issue was actually with that first dependency crocodoc.Resources.Base

Once I removed that, the error went away. So it looks like you can't make one group a dependency in another.

  • You certainly can make one group a dependency in another - that's the point of dependencies. The other two dependencies that you left are also just groups. I'm guessing the problem was elsewhere. – Peter Kjaer Mar 4 '13 at 9:10
4

I see there is an answer to this post, but i'm putting my 2 cents in as it might be useful...

I normally 'see' this error message when I make a mistake in my javascript file (typically missing the ; on the end of a line).

Should anyone see this post and still load their JS files, it's worth commenting out some chunks of your js and see if it loads.

  • good point. That's actually been one of the first things that I've looked at, but a good reminder, all the same. – paceaux Feb 27 '13 at 16:13
1

Remove <ext:control id="DashboardToolbar" />

Replace this

<ext:view name="DashboardView">
         <ext:control id="DashboardToolbar" />
</ext:view>

with this

<ext:view name="DashboardView" />

It's worth in reading Setting up a SDL Tridion 2011 GUI extension in 8 steps

  • I've edited the configuration as you've suggested. I'm still getting the same error message, though. <ext:add> <ext:extension pageid="ToolsPage" groupid="MaintenanceGroup" name="croc" assignid="croc"> <ext:command>crocodoc</ext:command> <ext:title>Crocodoc Configuration</ext:title> <ext:dependencies> <cfg:dependency>crocodoc.Resources.Settings</cfg:dependency> </ext:dependencies> <ext:apply> <ext:view name="DashboardView" /> </ext:apply> </ext:extension> </ext:add> – paceaux Feb 26 '13 at 5:16
  • @paceaux: Do you get a chance to read this Setting up a SDL Tridion 2011 GUI extension in 8 steps – Siva Charan Feb 26 '13 at 5:39
  • without exaggeration, I've read that article about 100 times. I've even gone to his blog, where it's posted, and asked questions there. – paceaux Feb 26 '13 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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