+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Attempting to upgrade to 5.1: "The configuration 'DynamicModulesConfig' is not registered"

Attempting to upgrade to 5.1: "The configuration 'DynamicModulesConfig' is not registered"

12 posts, 0 answered
  1. Compton
    Compton avatar
    18 posts
    Registered:
    02 Feb 2012
    23 Jul 2012
    Link to this post
    I am doing a dry run on upgrading our project to 5.1 and I getting a TargetInvocationException, InnerException="{"The configuration 'DynamicModulesConfig' is not registered"}" in my custom modules.

    The line of code is as follows:

    DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
  2. Compton
    Compton avatar
    18 posts
    Registered:
    02 Feb 2012
    23 Jul 2012
    Link to this post
    OK, I've redone the upgrade from scratch according to the instructions, and it has worked this time.
  3. Compton
    Compton avatar
    18 posts
    Registered:
    02 Feb 2012
    24 Jul 2012
    Link to this post
    I am still having a problem that may be related to my previous problem.   When I initially try to retrieve data for my Dynamic Module, the following code returns nothing.  If I go into the back end and view the Content manager for my module, and then view my live site, I am then able to query data until my application is restarted again, and then it reverts to not working.

     

    DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
    Type menusettingType = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.MenuSettings.Menusetting");
     
    // This is how we get the collection of MenuSetting items   
    var myCollection = dynamicModuleManager.GetDataItems(menusettingType);
     
    foreach (var ms in myCollection)
    {
  4. Stuart
    Stuart avatar
    18 posts
    Registered:
    28 Jul 2011
    25 Jul 2012
    Link to this post
    I had this problem too. I have the config stored in the database:
    <sitefinityConfig storageMode="Database" />
    and this seemed to be the issue.

    I had to manually merge the config xml from the database (sf_xml_config_items) into the config xml in files, truncate the config table and then re-do the upgrade.

    Good luck
  5. Compton
    Compton avatar
    18 posts
    Registered:
    02 Feb 2012
    25 Jul 2012
    Link to this post
    Thank you for your suggestion.  Unfortunately, in my case, I am not using database storagemode.  My DynamicModulesConfig.config file does appear to contain all of my modules.
  6. Stuart
    Stuart avatar
    18 posts
    Registered:
    28 Jul 2011
    25 Jul 2012
    Link to this post
    Also, they have now put permissions on dynamic modules so that only Administrators can access items in the dynamic modules.

    I think it works when your logged in because your an admin; but doesn't work when your not logged in. 

    In the Permissions screen you can change the settings for the dynamic modules. I've set mine to everyone and anonymous but still have the problem you are reporting.
  7. Stuart
    Stuart avatar
    18 posts
    Registered:
    28 Jul 2011
    26 Jul 2012
    Link to this post
    With help from Boyan from Telerik I solved this. 

    You need to go to the Dynamic Module under Content, then elect permissions on the right hand side. Set the view permission to everyone.
  8. Compton
    Compton avatar
    18 posts
    Registered:
    02 Feb 2012
    26 Jul 2012
    Link to this post
    Thanks, that worked for me also.
  9. Ralph
    Ralph avatar
    4 posts
    Registered:
    18 Jan 2012
    30 Jul 2012
    Link to this post
    I have simular issues. I've also got the error after upgrading to SF 5.1.
    But now all my Dynamic Content parts are gone.

    Under Content all created dynamic modules are missing and also the link to module builder in de settings pane is gone.

    Database usage for the config file is not an option here, and the other suggestion also didn't work.
    Hope someone can help
  10. Owain
    Owain avatar
    110 posts
    Registered:
    17 Jan 2012
    31 Jul 2012
    Link to this post
    I had this as well but if you go to

    Administration -> Modules, check to see if Module Builder has been installed.
    For some reason mine wasn't and I clicked install and it worked again.

    All my modules are now visible.

    O.

  11. Ralph
    Ralph avatar
    4 posts
    Registered:
    18 Jan 2012
    31 Jul 2012
    Link to this post
    @Owain:Yes I had to re-install the module. This was only possible after I made some changes to the System.config (had a wrong SF build reference).

    Now I have another issue, I'm receiving a NULL REFERENCE exception on the "Content > Dynamic module" page. I need to change the View permissions of the dynamic modules. They are only visible to Registred users. But because of the null reference exception I can't modify my content of dynamic modules anymore.
  12. Ralph
    Ralph avatar
    4 posts
    Registered:
    18 Jan 2012
    01 Aug 2012
    Link to this post
    I found a solution to my problem.
    - Go to: Administration > Module Builder
    - Export the structure of each dynamic module (via actions).
    - Delete dynamic module (via actions), content will be preserved because SF can't remove DB tables
    - Import the exported modules again.
    - Done!

12 posts, 0 answered