dojo module path 404

Vote:
 

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:

http://localhost/web/secure/Shell/1.0.456/ClientResources/dtk/myapp/editors/CssStringList.js

My modules config contains

    <dojoModules>
        <!-- Add a mapping to ~/ClientResources/Scripts to the dojo loader configuration --> 
         <add name="myapp" path="Scripts" />
    </dojoModules>
</module>

modules.config is in the root of the site. its not referenced anywhere in the web.config.

what am i missing?

 

thanks

  

 

 

 

 

 

#63633
Nov 22, 2012 16:05
Vote:
 

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:

http://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.UI.Samples

You need to include references to "bin\episerver.ui.dll" and "modulesbin\EPiServer.Cms.Shell.UI.dll" to be able to compile.

#63635
Nov 22, 2012 16:19
Vote:
 

Thanks, are you saying that i do not need a module.confiig?

 

I'm still unclear as to why it is requesting

http://localhost/web/secure/Shell/1.0.456/ClientResources/dtk/myapp/editors/CssStringList.js

and getting a 404. I presume there is some url-rewriting or http handling going on?

#63641
Nov 22, 2012 18:18
Vote:
 

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:

<dojoModules>
        <!-- Add a mapping from myapp to ~/ClientResources/Scripts to the dojo loader configuration -->
        <add name="myapp" path="Scripts" />
    </dojoModules>

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.

#63645
Nov 23, 2012 6:23
Vote:
 

Hi Linus

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.

#65797
Feb 10, 2013 14:07
Vote:
 

The module.config documentation in the SDK is probably a good starting point.

 

#65812
Feb 11, 2013 12:46
Vote:
 

Hi 

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

http://localhost/manage/Shell/1.0.456/ClientResources/dtk/EPiServerSample/Web/editors/StringList.js 

#65987
Edited, Feb 18, 2013 9:15
Vote:
 

@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>

#66086
Feb 19, 2013 21:04
Vote:
 

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

#76069
Oct 16, 2013 14:05
Vote:
 

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.

 

#76214
Oct 21, 2013 9:22
Vote:
 

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 work
also 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

    <dojo>
        <packages>
            <add name="ow-epi-extendedontentareaeditor" location="~/modules/ow.epi.extendedContentAreaEditor/Scripts" />
        </packages>
        <aliases>
            <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" />
        </aliases>
    </dojo>

    

 

#76216
Oct 21, 2013 9:35
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.