Try our conversational search powered by Generative AI!

EpiServer 7.1 Problems to crete Dojo component


Hi,I am trying to create a simple editor for Episerver 7.1. I have tried to follow the few blogs about doing so out there, but I have problemsw to get the component loading. EpiServer tries to load my js from Episerver/shell/2.1.90Clientresources/dtk... and not my relative module.config looks like this:<?xml version="1.0" encoding="utf-8"?>
<module loadLocalBin="true">
<add assembly="xyz.Intranet" />
<add name="xyz" path="Scripts"/>
<add name="epi-cms.widgets.base" path="Scripts/ModuleInitializer.js" resourceType="Script" />
<add name="epi-cms.widgets.base" path="Scripts/RequireModule.js" resourceType="Script" />
</module>I have created a simple EditorDescriptor:[EditorDescriptorRegistration(TargetType = typeof(string), UIHint = "ContactPersons")]

public class ContactPersonsEditorDescriptor: EditorDescriptor
public ContactPersonsEditorDescriptor()
ClientEditingClass = "xyz.ContactPersonsSelection";

}One moduleInitializer file:define([
// Dojo
], function (
// Dojo
) {
return declare("xyz.ModuleInitializer", [_Module], {
// summary: Module initializer for the default module.
initialize: function () {
var registry = this.resolveDependency("epi.storeregistry");
//Register the store
registry.create("xyz.customquery", this._getRestPath("ContactPersons"));
}, _getRestPath: function (name) { return routes.getRestPath({ moduleArea: "app", storeName: name }); }
});And one requiremodule file:define([
"epi/dependency"], function (
dependency) {
return {
load: function (
/*function*/load) {
var moduleManager = dependency.resolve("epi.ModuleManager");
dojo.when(moduleManager.startModules(id), function () { return load(moduleManager.getModule(id)); })
});And last the actual widget file (I only paste the init parts in it) contactparsonsSelection:define([
"epi/dependency", "epi/epi",
//We are calling the require module class to ensure that the App module has been set up
"xyz/requiremodule!App"], function (
appModule) {
return declare("xyz.ContactPersonsSelection", [_Widget, _TemplatedMixin, _WidgetsInTemplateMixin, _CssStateMixin, _ValueRequiredMixin],
{..... All files are located in /clientresources/scripts, except the module.config which is placed on the site root. When I try to run the site and load the widget, I get this error:
GET 404 (Not Found) dojo.js:15

Error {src: "dojoLoader", info: Array[2]}
Error: scriptError at _f ( at HTMLScriptElement.<anonymous> ( I feel like I have tried hundred different things and configs, but always I get this error. When i evaluate dojo.config, I can see that my relative path is loaded into the paths-array.

Object {async: true, packages: Array[0], baseUrl: "/EPiServer/Shell/2.1.90/ClientResources/dtk/dojo/", aliases: Array[3], deferredInstrumentation: false…}
afterOnLoad: truealiases: Array[3]async: truebaseUrl: "/EPiServer/Shell/2.1.90/ClientResources/dtk/dojo/"cache: Objectconfig: undefineddeferredInstrumentation: falseioPublish: trueisDebug: falselocale: "en-us"packages: Array[0]parseOnLoad: falsepaths: Objectdgrid: "/EPiServer/Shell/2.1.90/ClientResources/lib/dgrid"epi: "/EPiServer/Shell/2.1.90/ClientResources/EPi"epi-cms: "/EPiServer/CMS/2.1.82/ClientResources/EPi/Cms"epi-packaging: "/EPiServer/EPiServer.Packaging.UI/2.1.90/ClientResources"epi/cms: "/EPiServer/CMS/2.1.82/ClientResources/EPi/Cms"xyz: "/ClientResources/Scripts"put-selector: "/EPiServer/Shell/2.1.90/ClientResources/lib/put-selector"tinymce: "/EPiServer/CMS/2.1.82/ClientResources/Editor/tiny_mce"xstyle: "/EPiServer/Shell/2.1.90/ClientResources/lib/xstyle"__proto__: ObjectuseDeferredInstrumentation: ""__proto__: Object
If someone can point me in the right direction about this, I would be really thankful. I'm starting to go a bit crazy... :)

Nov 04, 2013 15:32
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.