I am trying to get a dojo module to load for a custom property, but the url requested does not exist, im not sure if the module is registering correctly:
episerver requests this url which 404s:
My modules config contains
<!-- Add a mapping to ~/ClientResources/Scripts to the dojo loader configuration -->
<add name="myapp" path="Scripts" />
modules.config is in the root of the site. its not referenced anywhere in the web.config.
what am i missing?
Module.config does not have to be loaded in any project. Your file should be placed in your site folder under ClientResources/Scripts/Editors/CssStringList.js.
I have just added the following package to our nuget feed with some samples:
You need to include references to "bin\episerver.ui.dll" and "modulesbin\EPiServer.Cms.Shell.UI.dll" to be able to compile.
Thanks, are you saying that i do not need a module.confiig?
I'm still unclear as to why it is requesting
and getting a 404. I presume there is some url-rewriting or http handling going on?
Sorry, misread your first post. You need a module.config file but it does not have to be included in the project, just located in the site root.
If you have added a new root namespace ("myapp") you need to add this to a module.config file. This is the configuration needed to set this up:
<!-- Add a mapping from myapp to ~/ClientResources/Scripts to the dojo loader configuration -->
<add name="myapp" path="Scripts" />
The reason why I say "a module config" is that there is one module.config per shell module. So if you would create an add-on you would have a separate module.config file in the root of your add-on.
Are there any documentation talking about how to use module.config? when does it load from the EPiServer etc? I am also getting very confused.
The module.config documentation in the SDK is probably a good starting point.
What do you mean by "new root namespace ("myapp")" ? where can I find this namespace? I am currently having the same issue, it always request to "xxx/Shell/1.0.456/ClientResources/dtk/" location
p.s. My project has "dot" in the project name, e.g. EPiServerSample.Web, it keeps showing me the following error
@Vincent: Do you have a module.config file in the site root with the following section:
<dojoModules> <!-- Add a mapping to ~/ClientResources/Scripts to the dojo loader configuration --> <add name="myapp" path="Scripts" /> </dojoModules>
I'm having the same problem here. No way it's loading the Js files from the right location.I have a modules file in the root
When a dojo namespace isn't found it's assumed to be rooted at the same level as dojo, hence the requests inside the dtk folder.
The easiest way is probably to base your changes on the module.config included in the sample alloy templates.
My problem occured in the 7.1 version of EPiServer. Thanks to Shaheed from EPiSupport my issue is resolved.
Version 7.1 contains a new version of Dojo (1.8). I had to change the module.config of my plugin to get it to workalso see http://world.episerver.com/Documentation/Items/Release-Notes/EPiServer-CMS/EPiServer-7/Release-Notes--EPiServer-7-1-CMS/
the module.config of the plugin now looks like
<add name="ow-epi-extendedontentareaeditor" location="~/modules/ow.epi.extendedContentAreaEditor/Scripts" />
<add from="ow/epi/extendedContentAreaEditor/overlayBlockArea" to="ow-epi-extendedontentareaeditor/overlayBlockArea" />
<add from="ow/epi/extendedContentAreaEditor/contentAreaValidator" to="ow-epi-extendedontentareaeditor/contentAreaValidator" />
<add from="ow/epi/extendedContentAreaEditor/formEditingWidget" to="ow-epi-extendedontentareaeditor/formEditingWidget" />