Try our conversational search powered by Generative AI!

404 on ClientResources files all of a sudden after upgrade to 12.23


I just noticed that none of my files in ClientResources are being loaded after an upgrade to CMS 12.23 and just returns 404. They've worked on earlier versions of CMS 12 (although hard to say on which version they worked in).

Has there been any breaking changes regarding this? I can't find anything usefull when I seach for information.

module.config hasn't been altered in months as well.

Oct 30, 2023 14:19

Have you 

  • Cleaned your solution? dotnet clean or similar, even manually removed all obj folders etc
  • Cleaned your nuget package folders? Either in the solution or in %userprofile%\.nuget\packages, sometimes both
  • Ensured you have a licensefile that your site can reach? ClientResources typically don't load unless.
Edited, Oct 30, 2023 14:32

It's the same problem up on DXP integration environment as well I'm afraid so it's not only local (and I've double checked that the files exist on disk).

Oct 30, 2023 14:34

I guess you were affected by this bug fix Vulnerability in CMS 12 shell module configuration | Optimizely D

due to its nature I can't disclose more information publicly. But you're welcome to contact developer support service for further assistance. 

Oct 30, 2023 14:41

Can you load the file in the browser? 

The error indicates the issue is a bad mime-type.

Oct 30, 2023 14:42

Quan: Great, I'll email support.

Eric: No, unfortunatelly not.

Oct 30, 2023 14:43

Got an answer from support now.

You need to move ClientResource-folder to wwwroot (or to your desired static asset location if you have an upgraded site that) and set the paths to the new location in module.config

Example module.config:

<module xmlns:xdt="">
    <add assembly="Client.Web" />
    <add name="epi-cms.widgets.base" path="/Static/styles/episerveredit.css" resourceType="Style"/>
    <add name="epi-cms.widgets.base" path="/Static/ClientResources/Scripts/widget/DisplayOptionSelector.js" resourceType="Script" />
    <add name="app.ModuleInitializer" path="/Static/ClientResources/Scripts/ModuleInitializer.js" resourceType="Script" />
    <add name="xx" path="/Static/ClientResources/xx/xx.js" resourceType="Script" />
    <add name="xx" path="/Static/ClientResources/fxx/styles.css" resourceType="Style" />
  <clientModule initializer="app.ModuleInitializer">
      <add dependency="CMS" type="RunAfter" />
      <add name="xx" path="/Static/ClientResources/xx" />
      <add name="app" path="/Static/ClientResources/Scripts" />
Oct 31, 2023 8:26
* 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.