Try our conversational search powered by Generative AI!

Ben  McKernan
Jan 8, 2018
  10702
(7 votes)

Issue with modules not being found in CMS 11

Hello everyone! I want to quickly address the issues around add-on modules not being found after upgrading to CMS 11 before misinformation starts to spread. Marija mentioned some of these issues in her previous blog post http://mariajemaria.net/upgraded-several-packages-episerver-11 and there have been some questions on the forum.

The problem usually manifests itself as either an assembly not being found at runtime or a route not resolving correctly in the UI.

It is caused by the following, and I'm not sure if this is a breaking change but as far as I know it has not been documented (I will have the breaking changes document updated in any case). As part of the CMS 11 release the dependencies of the EPiServer.CMS nuget package were changed to no longer include EPiServer.Packaging.UI, you can compare the versions here:

http://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.CMS&packageVersion=11.1.0

http://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.CMS&packageVersion=10.10.4

For some reason, unknown to me, having EPiServer.Packaging installed changes the default behavior of the modules system to scan the protected modules folder and automatically load modules found there during startup. The default behavior without it installed is not to scan the protected modules folder. However this can be configured via the episerver.shell section of the web.config.

So there are a couple of easy options to fix this, either:

1. Add autoDiscovery="Modules" to the protectedModules element under episerver.shell in the web.config

<protectedModules rootPath="~/EPiServer/" autoDiscovery="Modules />

2. Or add each protected module that should be loaded as a child to the protectedModules element (this is the default setup)

<protectedModules rootPath="~/EPiServer/">
  <add name="Shell" />
  <add name="CMS" />
  <add name="EPiServer.Cms.TinyMce" />
</protectedModules>

Also as a side note, I recommend against installing EPiServer.Packaging. The recommended way of installing add-ons is via nuget.

Jan 08, 2018

Comments

Marija Jemuovic
Marija Jemuovic Jan 8, 2018 03:00 PM

Thx a lot, Ben! Will update my post promptly :)

Vincent Baaij
Vincent Baaij Jan 8, 2018 04:01 PM

Too bad EPiServer Social Reach has a dependency on EPiServer.Packaging. Do you know why that is?

Ben  McKernan
Ben McKernan Jan 8, 2018 04:54 PM

@Marija great thanks!

@Vincent I'm not sure why they have a dependency on packaging. I don't like being pessimistic but it probably is because they didn't know how the module resolving worked and having packaging installed fixed the problems described in this post.

I should also mention that episerver add-ons usually add themselves to that protected modules list when installing the nuget package. This is done via a web.config transform.

David Elias
David Elias Jan 8, 2018 06:02 PM

There are actually a lot things that have a dependency on EPiServer.Packaging.  Out of curriosity, I just tried to remove it and have 4 other packages that all have a dependency on it.

Cathinka Walberg
Cathinka Walberg Aug 15, 2018 10:45 AM

Hi! We are struggling with XForms not loading. This most likely started after we upgraded to Episerver 11.
Other modules like TinyMCE are loading correctly.

In edit mode the XForm property is shown as a textarea with the forms guid, whilst when rendering it only shows the text "EPiServer.XForms.XForm". I opened this issue yesterday: https://world.episerver.com/forum/legacy-forums/episerver-cms-7-and-earlier-versions/thread-container/2018/8/xforms-not-rendering-in-a-solution-upgraded-to-11/?pageIndex=1#reply

The web.config looks like this:

    
      
        
          
          
          
          
        
      
      
      
      
      
      
    

Does anyone have any pointers?

Goran Solomonovic
Goran Solomonovic Aug 9, 2019 07:47 AM

I had issues with Episerver.Forms.Core dll when initializing site. Had to add following in my web.config:

<protectedModules rootPath="~/EPiServer/">
	<add name="EPiServer.Forms.UI">
           <assemblies>
               <add assembly="EPiServer.Forms.Core" />
           </assemblies>
       </add>
</protectedModules>

Error for reference: Unable to find module by assembly 'Episerver.Forms, Version=4.25.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'

Eric
Eric Jan 31, 2024 07:17 PM

We are getting this same error except with asp core 8.0. What is the fix for that?

Please login to comment.
Latest blogs
Why C# Developers Should Embrace Node.js

Explore why C# developers should embrace Node.js especially with Optimizely's SaaS CMS on the horizon. Understand the shift towards agile web...

Andy Blyth | May 2, 2024 | Syndicated blog

Is Optimizely CMS PaaS the Preferred Choice?

As always, it depends. With it's comprehensive and proven support for complex business needs across various deployment scenarios, it fits very well...

Andy Blyth | May 2, 2024 | Syndicated blog

Adding market segment for Customized Commerce 14

Since v.14 of commerce, the old solution  for adding market segment to the url is not working anymore due to techinal changes of .NET Core. There i...

Oskar Zetterberg | May 2, 2024

Blazor components in Optimizely CMS admin/edit interface

Lab: Integrating Blazor Components into Various Aspects of Optimizely CMS admin/edit interface

Ove Lartelius | May 2, 2024 | Syndicated blog

Anonymous Tracking Across Devices with Optimizely ODP

An article by Lead Integration Developer, Daniel Copping In this article, I’ll describe how you can use the Optimizely Data Platform (ODP) to...

Daniel Copping | Apr 30, 2024 | Syndicated blog

Optimizely Forms - How to add extra data automatically into submission

Some words about Optimizely Forms Optimizely Forms is a built-in add-on by Optimizely development team that enables to create forms dynamically via...

Binh Nguyen Thi | Apr 29, 2024