Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 12, 2009 @ 17:32
    Ismail Mayat
    0

    Custom data type issue

    Guys,

    Using 4.0.1 asp.net 2.0 on win2k3 iis6.

    I have a custom datatype it lists a bunch of media items from a specified folder as drop down down list.  It was all working now has stopped working. The datatype is still there however when you click on it in the developer section you get the following error

    The given key was not present in the dictionary.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

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

       System.ThrowHelper.ThrowKeyNotFoundException() +28

       System.Collections.Generic.Dictionary`2.get_Item(TKey key) +2645040

       umbraco.cms.businesslogic.datatype.controls.Factory.GetNewObject(Guid DataEditorId) in c:\Projects\umbraco-src\umbraco\cms\businesslogic\datatype\factory.cs:50

       umbraco.cms.businesslogic.datatype.controls.Factory.DataType(Guid DataTypeId) in c:\Projects\umbraco-src\umbraco\cms\businesslogic\datatype\factory.cs:40

       umbraco.cms.businesslogic.datatype.DataTypeDefinition.get_DataType() in c:\Projects\umbraco-src\umbraco\cms\businesslogic\datatype\DataType.cs:79

       umbraco.cms.presentation.developer.editDatatype.Page_Load(Object sender, EventArgs e) in c:\Projects\umbraco-src\umbraco\presentation\umbraco\developer\DataTypes\editDatatype.aspx.cs:49

       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14

       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35

       System.Web.UI.Control.OnLoad(EventArgs e) +99

       umbraco.BasePages.BasePage.OnLoad(EventArgs e) in c:\Projects\umbraco-src\umbraco\businesslogic\BasePages\BasePage.cs:287

       System.Web.UI.Control.LoadRecursive() +50

       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

    When you goto dataypes and try to create new datatype you don't see the datatype in the list.  It would seem as though its not there anymore. I did a look in the database table cmsdatatype using the guid and its definitely there.  It seems as though during the load via reflection of the datatype something is going wrong, although it was working fine.  Anyone else seen this before?  Any ideas on how to debug i tried doing attach process but that doesn't work because it looks as though the error is occurring during load via reflection.

    Regards

     

    Ismail

     

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Aug 12, 2009 @ 17:36
    Thomas Höhler
    0

    Did you check if the dll containing the datatype is in the bin folder? and did you refresh the application pool to restart the site from scratch to load all datatypes? For some moments I had the same issues where I deleted the dll

    Thomas

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Aug 12, 2009 @ 17:39
    Thomas Höhler
    0

    Or did you add a new datatype with the same guid?

    Thomas

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 12, 2009 @ 18:25
    Ismail Mayat
    0

    Thomas,

    The dll is definately in the bin becuase it has other datatypes and they work fine.  The guid is unique else we would get another error cant remember what that is but I have seen it before. I did try giving it another guid and then re adding still no joy, also tried app pool restart i may try clearing out the cache dir in windows/.net dir.  Thanks for the suggestions.

    Regards

     

    Isamil 

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Aug 13, 2009 @ 08:47
    Thomas Höhler
    0

    Did you solve this problem?

    Thomas

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 13, 2009 @ 11:26
    Ismail Mayat
    0

    Thomas,

    Fixed.  The issue was that the dll had been updated but compiled against a different version of umbraco, the dll references were updated recompiled and all is now well.

    Many thanks for your help.

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft