November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hello Mark,
Did you find the issue? I have the same problem.
Thanks,
Regards.
I would guess that your module is loading before the EPiServer module has loaded (as mentioned in the comments to Ted's post). Add the following to your module.config
<clientModule> <moduleDependencies> <add dependency="Shell" /> <add dependency="CMS" /> </moduleDependencies> </clientModule>
Ben,
I added the <clientModule> section to the module.config file in the site root, but still get the same issue.
Should I be adding the section to a module.config file in the same folder as my WorkflowCommands.js file?
I raised issue DI-142857 on October 6th for this, and uploaded a test case, but haven't heard anything since, despite repeated reminders.
It seems odd to me that you would have two module.config files but in any case it should be in the one that is loading the JavaScript stuff. The idea being that you want to delay loading and running your JavaScript till the EPiServer module has loaded.
Also you would probably get away with only having a dependency on Shell. So you can probably remove the line with the CMS dependency in the code I posted previously.
And finally I'm not part of the support team so I can't help you with the support case. I just happened to be browsing the forums ;) I have pinged them however and hopefully they pick this up.
Thanks for that Ben,
I'm sure I've misconfigured something, but haven't been able to work out what.
Hopefully Developer Support will get back to me with what I've done wrong.
Developer Support put me right on this: the 'define([' on line 1 of the WorkflowCommands.js should be 'require(['
I've upgraded to 7.19 and getting the same error, have changed define to require and added shell to module.config, still same error is throwed. Any more ideas?
After the upgrade to 7.19.2 and EPiServer.CMS.UI to 7.18.0 this stopped working. I am getting the error
"Error: Could not resolve dependency "epi.globalcommandregistry" (epi.dependency)" Any ideas?
The "epi.globalcommandregistry" dependency is setup in the initialization of our Shell module. If you can not resolve the dependency then your code must be running before the Shell module is initialized. If you run in debug mode then I believe we log the module initialiation to the console. This would be the best place to start debugging.
Also if you are using the above hack then I recommend you rewrite you code to use a module initializer and the initializer attribute in the module config that was added in 7.5 http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/75/Configuration/Configuring-moduleconfig/#clientModule
I'm creating a custom toolbar button usng Dojo as described here: http://tedgustaf.com/blog/2014/6/add-a-custom-toolbar-button-in-episerver-7/ I'm fairly sure I've got everything wired up correctly, but when I start the site and enter edit mode, I get the following error:
The code for my button registration module, WorkflowCommands.js in the folder ClientResources/Scripts/widgets/widgetlib is as follows:
My module.config file (in the website root) looks like this:
I think I need to register a dependency on the Shell module, but I'm not sure how - anyone got any ideas?
Thanks in advance,
Mark