Try our conversational search powered by Generative AI!

No store by the name 'epi.cms.contentdata' exists [CMS 9.12.2]

Vote:
 

I have a custom widget that, when I add it to the Dashboard, I get this JS error: "Uncaught Error: No store by the name 'epi.cms.contentdata' exists." The code that triggers this error is:

var storeRegistry = dependency.resolve('epi.storeregistry');
this._contentStore = storeRegistry.get('epi.cms.contentdata'); // error triggers here

Any ideas what could be going on? This store is supposedly a built-in store, right?

#185182
Edited, Nov 10, 2017 10:13
Vote:
 

Hi!

When running in the dashboard the cms module are not loaded. You need to add the dependency in the moduleDependencies section in the module.config https://world.episerver.com/documentation/developer-guides/CMS/configuration/Configuring-moduleconfig/ 

I hope it solves it for you

#185430
Nov 20, 2017 9:13
Vote:
 

Hi Jim.

I tried adding the following to the module.config file, but I'm still getting the exact same error:

  <clientModule>
      <moduleDependencies>
          <add dependency="CMS" type="RunAfter" />
      </moduleDependencies>
  </clientModule>

Is this correct, or am I doing it wrong?

#185999
Dec 08, 2017 13:36
Vote:
 

Hey, did you get this working. I would guess that the type of the dependency needs to be "Require" in order to force CMS to be loaded.

#186941
Jan 09, 2018 10:38
Vote:
 

Hello Ben,

No, unfortunately, I did not get this working. I will try using "Require" instead of "RunAfter" and report back!

#186942
Jan 09, 2018 10:43
Vote:
 

Thank you Ben, with using "Require" as the dependency type, the widget works. :)

#186967
Jan 09, 2018 14:35
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.