Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

In reference to my previous question (javascript is not hitting from configuration file in GUI Extension), I have applied Config changes and js changes as I got in my old question answer still I am getting this error in Browser Console.

What does it mean and how can I resolve it? What is the cause of this?

Warning :Command is not registered

My latest Config

<

    ?xml version="1.0"?>
    <Configuration xmlns="http://www.sdltridion.com/2009/GUI/Configuration/Merge" xmlns:cfg="http://www.sdltridion.com/2009/GUI/Configuration" xmlns:ext="http://www.sdltridion.com/2009/GUI/extensions" xmlns:cmenu="http://www.sdltridion.com/2009/GUI/extensions/ContextMenu">
      <resources cache="false">
        <cfg:filters/>
        <cfg:groups>
          <cfg:group name="Counter.Commands" merger="Tridion.Web.UI.Core.Configuration.Resources.CommandGroupProcessor"  merge="always">
            <cfg:fileset>
              <cfg:file type="script">/Counter/Counter.js</cfg:file>
              <cfg:file type="reference">Counter.CommandSet</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>
        </cfg:groups>
      </resources>
      <definitionfiles/>
      <extensions>
        <ext:editorextensions>
          <ext:editorextension target="CME">
            <ext:editurls />
            <ext:listdefinitions/>
            <ext:taskbars/>
            <ext:commands />
            <ext:commandextensions/>
            <ext:contextmenus>
              <ext:add>
                <ext:extension name="Counter" assignid="ext_Counter" insertbefore="cm_refresh">
                  <ext:menudeclaration externaldefinition="">
                    <cmenu:ContextMenuItem id="ext_Counter" name="Count:" command="CounterCommand"/>
                  </ext:menudeclaration>
                  <ext:dependencies>
                    <cfg:dependency>Counter.CommandSet</cfg:dependency>
                  </ext:dependencies>
                  <ext:apply>
                    <ext:view name="DashboardView"/>
                  </ext:apply>
                </ext:extension>
              </ext:add>
            </ext:contextmenus>
            <ext:lists/>
            <ext:tabpages/>
            <ext:toolbars/>
            <ext:ribbontoolbars/>
          </ext:editorextension>
        </ext:editorextensions>
        <ext:dataextenders/>
      </extensions>
      <commands>
        <cfg:commandset id="Counter.CommandSet">
        <cfg:command name="CounterCommand" implementation="Extensions.Counter"/>
        <cfg:dependencies>
        <cfg:dependency>Counter.Commands</cfg:dependency>
        </cfg:dependencies>
        </cfg:commandset>
      </commands>
      <contextmenus/>
      <localization/>
      <settings>
        <defaultpage>/Views/Default.aspx</defaultpage>
        <navigatorurl>/Views/Default.aspx</navigatorurl>
        <editurls/>
        <listdefinitions/>
        <itemicons/>
        <theme>
          <path/>
        </theme>
        <customconfiguration/>
      </settings>
    </Configuration>
share|improve this question
    
Why does resource group Counter.Commands have a reference to Counter.CommandSet? I just see that Counter.CommandSet has a dependency on Counter.Commands and I do not know how Tridion handles this circular dependency. –  Thomas Hendrickx Aug 21 at 8:03

1 Answer 1

up vote 7 down vote accepted

That error means that some code is calling executeCommand with the name of a command that either hasn't been registered or doesn't implement the "Tridion.Core.Command" interface.

Commands are automatically registered when defined in the configuration, and the code in your other question seems to implement the correct interface, so I would say that the problem is likely that it is still not configured correctly.

New commands will need to be registered in the <commands> section of your Editor configuration file. If you need assistance with that, you'll need to post your updated configuration XML so that we can point out the problem.

Try double-checking that you've followed the steps outlined in the documentation for creating a new command.

share|improve this answer
    
hi peter please check latest config –  Pankaj786 Aug 21 at 4:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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