I have tried to add a new command Extension in SDL 8.5 but when I restart the IIS and the services, The content manager doesn't load.
The extension modifies publishing buttons behaviour.
PublicationOptions.config
<cfg:filters />
<cfg:groups>
<cfg:group name="SDLWeb.Resources.PublicationOptions">
<cfg:fileset>
<cfg:file type="script">js/PublicationOptions.js</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:itemicons />
<ext:taskbars />
<ext:commands />
<ext:commandextensions>
<ext:commands>
<ext:command name="Publish" extendingcommand="PublicationOptions" />
<ext:command name="UnPublish" extendingcommand="PublicationOptions" />
</ext:commands>
<ext:dependencies>
<cfg:dependency>SDLWeb.Resources.PublicationOptions</cfg:dependency>
</ext:dependencies>
</ext:commandextensions>
<ext:contextmenus />
<ext:lists />
<ext:tabpages />
<ext:toolbars />
<ext:ribbontoolbars />
<ext:extendedareas />
<ext:optionspanels />
</ext:editorextension>
</ext:editorextensions>
<ext:dataextenders />
</extensions>
<commands>
<cfg:commandset id="SDLWeb.Commands.PublicationOptions">
<cfg:command name="PublicationOptions" implementation="SDLWeb.Tridion.CommandExtensions.PublicationOptions"/>
<cfg:dependencies>
<cfg:dependency>SDLWeb.Resources.PublicationOptions</cfg:dependency>
</cfg:dependencies>
</cfg:commandset>
</commands>
<contextmenus />
<localization />
<settings>
<dependencies />
<defaultpage />
<editurls />
<listdefinitions />
<theme>
<path>/Themes/</path>
</theme>
<customconfiguration />
</settings>
PublicationOptions.js
Type.registerNamespace("SDLWeb.Tridion.CommandExtensions");
SDLWeb.Tridion.CommandExtensions.PublicationOptions = function () {
Tridion.OO.enableInterface(this, "SDLWeb.Tridion.CommandExtensions.PublicationOptions");
this.addInterface("SDLWeb.Web.UI.Editors.Base.Commands.CommandBase", ["PublicationOptions"]);
};
SDLWeb.Tridion.CommandExtensions.PublicationOptions.prototype._isAvailable = function (selection, pipeline) {
if (pipeline) {
pipeline.stop = true;
}
return false;
};
/*
*Checks whether to enable / disable the extension
*/
SDLWeb.Tridion.CommandExtensions.PublicationOptions.prototype._isEnabled = function (selection, pipeline) {
console.log("isEnabled");
if (pipeline) {
pipeline.stop = true;
}
return this._isAvailable(selection, pipeline);
};
/*
* default implementation
*/
SDLWeb.Tridion.CommandExtensions.PublicationOptions.prototype._execute = function (selection, pipeline) {
if (pipeline) {
pipeline.stop = false;
}
};
System.config
<editor name="PublicationOptions">
<installpath>D:\SDL Web\GUIExtensions\PublicationOptions\</installpath>
<configuration>config\PublicationOptions.config</configuration>
<vdir>PublicationOptions</vdir>
</editor>
Can anyone help me?