Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Frank 1 post 71 karma points
    Mar 08, 2017 @ 10:52
    Frank
    0

    Umbraco Courier Key not found

    Hi,

    We're using Umbraco v6.2.1 with Umbraco Courier 2.7.8.9.v6. If we browse to Umbraco -> Courier -> Deploy then we receive the following error:

    [KeyNotFoundException: The given key was not present in the dictionary.]
    

    System.Collections.Generic.Dictionary2.get_Item(TKey key) +12264833 Umbraco.Courier.Core.PersistenceManager.get_Default() +76 Umbraco.Courier.Core.ItemProvider.get_DatabasePersistence() +18 Umbraco.Courier.ItemProviders.DataTypeProvider.AvailableSystemItems() +8 Umbraco.Courier.UI.Pages.SimpleRevisionDeploy.<Page_Load>b__0(ItemProvider p) +19 System.Linq.WhereListIterator1.MoveNext() +73 System.Web.UI.WebControls.ListControl.PerformDataBinding(IEnumerable dataSource) +276 System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +290 System.Web.UI.WebControls.ListControl.PerformSelect() +37 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74 Umbraco.Courier.UI.Pages.SimpleRevisionDeploy.Page_Load(Object sender, EventArgs e) +199 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51 System.Web.UI.Control.OnLoad(EventArgs e) +95 System.Web.UI.Control.LoadRecursive() +59 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678

    After some decompiling and debugging Courier.UI.dll we found out that the error occurs when binding the data to the dropdownlist.

    SimpleRevisionDeploy.cs -> Line: 41, this.ddl_types.DataBind();

    protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.get_IsPostBack())
            {
                IEnumerable<ItemProvider> enumerable = from p in ItemProviderCollection.Instance.GetProviders()
                                                        where (bool)((p.AvailableSystemItems().get_Count() > 0) && !CourierSecurity.ValidateNegativeSetting(CourierSecurity.BuildKey(p.Id, UserProviderSettings.DenyUsage)))
                                                        select p;
    
                this.ddl_types.set_DataSource(enumerable);
                this.ddl_types.set_DataTextField("Name");
                this.ddl_types.set_DataValueField("Id");
                this.ddl_types.DataBind();
                this.ddl_types.Items.Insert(0, new ListItem("Select item type", string.Empty));
            }
        }
    

    Unfortunately it's not possible to Upgrade to Umbraco 7 due to time shortage.

    Kind Regards, Frank

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies