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

Forums / General Discussions / Upgrading to 8.0 Error

Upgrading to 8.0 Error

17 posts, 0 answered
  1. Jared
    Jared avatar
    122 posts
    Registered:
    04 Apr 2013
    29 May 2015
    Link to this post

    I am continuing to get the following error in attempts to upgrade to Sitefinity 8.0 from 5.4.  I have checked the UpgradeTrace log file and do not see anything that has "failed".  As anyone come across this similar issue?

    Exception information: 
        Exception type: ArgumentException 
        Exception message: An item with the same key has already been added.
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Telerik.Sitefinity.Services.ModuleExtensions.RegisterDataSources(ModuleBase module)
       at Telerik.Sitefinity.Services.SystemManager.Initialize()
       at Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes()
       at Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap()
       at Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

     

    Thread information: 
        Thread ID: 22 
        Thread account name: NT AUTHORITY\NETWORK SERVICE 
        Is impersonating: False 
        Stack trace:    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Telerik.Sitefinity.Services.ModuleExtensions.RegisterDataSources(ModuleBase module)
       at Telerik.Sitefinity.Services.SystemManager.Initialize()
       at Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes()
       at Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap()
       at Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)​​

  2. Jared
    Jared avatar
    122 posts
    Registered:
    04 Apr 2013
    01 Jun 2015 in reply to Jared
    Link to this post

    Anyone come across this issue?  I submitted a support ticket with Telerik and was told the following:

    The errors from the logs indicate that a module in Sitefinity (not specified which one) is attempting to get registered twice "An item with the same key has already been added".

     Any help or guidance would be greatly appreciated.  It would be very beneficial if there was a way to discover which Sitefinity module was attempting to get registered twice.

  3. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    01 Jun 2015 in reply to Jared
    Link to this post
    Open your System.config, do you see any modules there with error attributes?
  4. Jared
    Jared avatar
    122 posts
    Registered:
    04 Apr 2013
    01 Jun 2015 in reply to Steve
    Link to this post

    Here is the contents of SystemConfig.config.  I do not see any error attributes.  Note: I manually changed the version numbers on this.  I have tried an upgrade by changing them manually and not touching them at all. 

    <?xml version="1.0" encoding="utf-8"?>
    <systemConfig xmlns:config="urn:telerik:sitefinity:configuration" xmlns:type="urn:telerik:sitefinity:configuration:type" config:version="8.0.5710.0" build="4040" previousBuild="4010">
    <applicationModules>
    <add startupType="Disabled" name="Multisite" />
    <add version="8.0.5710.0" name="Scheduling" />
    <add version="8.0.5710.0" name="Search" />
    <add version="8.0.5710.0" name="News" />
    <add version="8.0.5710.0" name="Blogs" />
    <add version="8.0.5710.0" name="Events" />
    <add version="8.0.5710.0" name="Libraries" />
    <add version="8.0.5710.0" name="Forms" />
    <add version="8.0.5710.0" name="Lists" />
    <add version="8.0.5710.0" name="Analytics" />
    <add version="8.0.5710.0" name="Newsletters" />
    <add version="8.0.5710.0" name="GenericContent" />
    <add version="8.0.5710.0" name="ControlTemplates" />
    <add version="8.0.5710.0" name="Migration" />
    <add version="8.0.5710.0" name="Ecommerce" />
    <add version="8.0.5710.0" name="ModuleBuilder" />
    <add version="8.0.5710.0" name="ResponsiveDesign" />
    <add version="8.0.5710.0" name="Publishing" />
    <add version="8.0.5710.0" name="Forums" />
    <add version="8.0.5710.0" name="Thunder" />
    <add startupType="Disabled" name="Personalization" />
    </applicationModules>
    <typeImplementationsMapping>
    <add type="Telerik.Sitefinity.Web.UI.ContentUI.Config.ContentViewDefinitionElement, Telerik.Sitefinity">
    <implementations>
    <add type="Telerik.Sitefinity.Forums.Web.Config.ThreadsViewMasterElement, Telerik.Sitefinity.Forums" />
    <add type="Telerik.Sitefinity.Forums.Web.Config.ForumsViewMasterElement, Telerik.Sitefinity.Forums" />
    </implementations>
    </add>
    <add type="Telerik.Sitefinity.Web.UI.Fields.Config.FieldDefinitionElement, Telerik.Sitefinity">
    <implementations>
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Catalog.Web.UI.Fields.Config.CreateVariationsFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Catalog.Web.UI.Fields.Config.VariationsFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Catalog.Web.UI.Fields.Config.InventoryFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.Fields.OrderFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.Fields.CustomerFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.Fields.PaymentMethodSettingsFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Forums.Web.Config.PostInfoFieldElement, Telerik.Sitefinity.Forums" />
    </implementations>
    </add>
    <add type="Telerik.Sitefinity.Web.UI.Backend.Elements.Config.WidgetElement, Telerik.Sitefinity">
    <implementations>
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Catalog.Web.UI.Widgets.ProductTypeFilterWidgetDefinitionElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Catalog.Web.UI.Widgets.ProductOtherFilterOptionsWidgetDefinitionElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.Widgets.OrderStatusFilterWidgetDefinitionElement, Telerik.Sitefinity.Ecommerce" />
    </implementations>
    </add>
    <add type="Telerik.Sitefinity.Web.UI.Fields.Config.FieldControlDefinitionElement, Telerik.Sitefinity">
    <implementations>
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Catalog.Web.UI.Fields.Config.CreateVariationsFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Catalog.Web.UI.Fields.Config.VariationsFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Catalog.Web.UI.Fields.Config.InventoryFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.Fields.OrderFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.Fields.CustomerFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.Fields.PaymentMethodSettingsFieldElement, Telerik.Sitefinity.Ecommerce" />
    <add type="Telerik.Sitefinity.Forums.Web.Config.PostInfoFieldElement, Telerik.Sitefinity.Forums" />
    </implementations>
    </add>
    </typeImplementationsMapping>
    </systemConfig>​

  5. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    01 Jun 2015 in reply to Jared
    Link to this post

    What do you mean you manually changed the numbers?  Like you literally put in the new version #?...if so that's a big nono

     Try removing the version from all of those, it'll force the modules to reinstall themselves (you wont lose data)

  6. Jared
    Jared avatar
    122 posts
    Registered:
    04 Apr 2013
    01 Jun 2015 in reply to Steve
    Link to this post

    I have done multiple test upgrades and have done both, manually updating and not touching them.  I do know the Upgrade instructions states to not touch them, that the upgrade process would update them.  Well, that was not happening as the config files had the old reference number (5.4.4040.0).  I have read that removing the version number will re-install them, so I was going to try that as a test upgrade as well.  My question is do I or can I remove the "config:version" attribute on line 2 of XML file also as well as the "build" and "previousBuild" attributes?

  7. Jared
    Jared avatar
    122 posts
    Registered:
    04 Apr 2013
    01 Jun 2015 in reply to Steve
    Link to this post
    FYI, I did not manually add the version number, I just was changing the version version number.  I only did this as a test to see if it helped on the amount of errors/issues I was getting on the upgrade.
  8. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    01 Jun 2015
    Link to this post

    You just remove the version on each module, not the config file itself

     

    <add version="8.0.5710.0" name="Blogs" />

    <add name="Blogs" />​​

    I'm not sure what would happen if you removed it from the root element

  9. Jared
    Jared avatar
    122 posts
    Registered:
    04 Apr 2013
    01 Jun 2015 in reply to Steve
    Link to this post

    I will try that.  My issue with Sitefinity is that their instructions state that Sitefinity updates the version number automatically on the upgrade on first run of the site, but that is not the case.

     

    From http://docs.sitefinity.com/upgrade:

    IMPORTANT: You must not manually change the Sitefinity version numbers stored in your configuration files. This is handled automatically by the upgrade process that starts with the first run of the website.​

  10. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    01 Jun 2015 in reply to Jared
    Link to this post

    It is the case, that's how it works...if there's an error preventing the upgrade at some step then it very much wont though...you should never update those numbers by yourself.  The only exception is the System.config where you can REMOVE the version attribute to force those modules to update themselves again.

     I usually have the system.config open in notepad++ or visual studio and you can see when the upgrade happens because the file gets updated (the config:version) then you'll see each module get it's version updated down the list.  If a particular module has problems updating, you'll see an error attribute on that line.

    What specifically did you change in the file (the config:version and all the modules?)

  11. Jared
    Jared avatar
    122 posts
    Registered:
    04 Apr 2013
    01 Jun 2015 in reply to Steve
    Link to this post

    I did a search on my entire solution for 5.4.4040.0 and replaced it with 8.0.5710.0

    I will attempt another test upgrade by removing the version number from the <add version="...." >

  12. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    01 Jun 2015 in reply to Jared
    Link to this post

    I would actually totally rollback that find\replace on all files that you did...then maybe get all the files from _EmptyProject and overwrite everything in my bin folder again.

     Like removing the version# from the modules won't fix this...like I said, step 1 is the config:version being updated.  If that didn't change to v8, then there's a bigger upgrade step failing somewhere along the line and it's not even upgrading the CORE.

    Zip it all up (db\project), put in a ticket is the best bet, they can debug in the source.

    Steve

  13. Jared
    Jared avatar
    122 posts
    Registered:
    04 Apr 2013
    02 Jun 2015 in reply to Steve
    Link to this post
    So all the settings are stored in the DB in the table called sf_xml_config_items.  I am trying to determine the point of the files in the solution when the settings are in the DB.  The value in the DB differ from what is in the solution.  The DB does not update the file on the file system.
  14. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    02 Jun 2015 in reply to Jared
    Link to this post
    The db and external are merged together...like changes from defaults are then pulled to the external xml
  15. Jared
    Jared avatar
    122 posts
    Registered:
    04 Apr 2013
    02 Jun 2015 in reply to Steve
    Link to this post
    Yes they are merged. However, if a change is made in the backend it only writes it to the DB and not the file on file system. Or at least that is what I have discovered. I was just looking for confirmation on that.
  16. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    02 Jun 2015 in reply to Jared
    Link to this post
    There is an option for DB-only config storage...in that case it'd persist the changes there only.  Default though is to the file system...you didn't configure it to store configs in the DB did you?
  17. Jared
    Jared avatar
    122 posts
    Registered:
    04 Apr 2013
    02 Jun 2015 in reply to Steve
    Link to this post

    We do have the following in our web.config:

    <telerik>
        <sitefinity>
          <sitefinityConfig storageMode="Database"/>
        </sitefinity>
      </telerik>​

17 posts, 0 answered