Copied to clipboard

Flag this post as spam?

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


  • Jonas Eriksson 930 posts 1825 karma points
    Aug 24, 2010 @ 11:07
    Jonas Eriksson
    0

    Strange issue : only _thumb in images and error in log

    Hi!

    You have any thoughts of what this can be?

    We upload ordinary files okay. But image files wont save - node is created - and image file _thumb's are saved(!)

    Digged a bit and I get an error on GenerateAdditionalThumbnails in the log. "The given key was not present in the dictionary."

    I guess uploadFieldDataTypeId Guid might not have been registred in my installation, could it be like so? How can I do that manually? + could that cause my non-saving-image-problem?

    Regards

    / Jonas

    *Big DMU-fan*

    Error:

    System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.     at System.Collections.Generic.Dictionary`2.get_Item(TKey key)     at umbraco.cms.businesslogic.datatype.controls.Factory.GetNewObject(Guid DataEditorId)     at umbraco.cms.businesslogic.datatype.controls.Factory.DataType(Guid DataTypeId)     at umbraco.cms.businesslogic.datatype.DataTypeDefinition.get_DataType()     at umbraco.cms.businesslogic.datatype.DataTypeDefinition.GetByDataTypeId(Guid DataTypeId)     at TheOutfield.UmbExt.DesktopMediaUploader.UmbracoImageMediaFactory.GenerateAdditionalThumbnails(Image image, Int32 fileWidth, Int32 fileHeight, String destFilePath)     at TheOutfield.UmbExt.DesktopMediaUploader.UmbracoImageMediaFactory.CreateMedia(Int32 parentNodeId, HttpPostedFile uploadFile)     at TheOutfield.UmbExt.DesktopMediaUploader.DesktopMediaUploaderHandler.ProcessUploadRequest(HttpContext context, XmlTextWriter xmlTextWriter)

    TypeId (form source):

    Guid uploadFieldDataTypeId = new Guid("5032a6e6-69e3-491d-bb28-cd31cd11086c");

    Btw: a big +100 for making the source available for your packages.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Aug 24, 2010 @ 12:02
    Matt Brailsford
    0

    Hey Jonas,

    If you run the following SQL script on your database, do you get back a row?

    SELECT *
    FROM [dbo].[cmsDataType]
    WHERE controlId = '5032a6e6-69e3-491d-bb28-cd31cd11086c'

    Also, in the row that gets returned, does a node with the returned nodeId exist in the umbracoNode table?

    It does sound like it's not been able to create the upload control

    Matt

  • Jonas Eriksson 930 posts 1825 karma points
    Aug 24, 2010 @ 12:39
    Jonas Eriksson
    0

    Hi!

    cmsDataType:

    pk    nodeId    controlId    dbType
    11    -90    5032A6E6-69E3-491D-BB28-CD31CD11086C    Nvarchar

    umbracoNode:

    id    trashed    parentID    nodeUser    level    path    sortOrder    uniqueID    text    nodeObjectType    createDate
    -90    0    -1    0    11    -1,-90    35    84C6B441-31DF-4FFE-B67E-67D5BC3AE65A    Upload    30A2A501-1978-4DDB-A57B-F7EFED43BA3C    2004-09-30 14:01:49.920

    I managed to get the files there by by opening up the DMO-created images in Media and uploading with the built in choose file -> save.

    I just uninstalled an reinstalled (using build in function, no manual deletes), but same problem. What key might be missing, can I add it manually?

    *puzzled*

    /Jonas

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Aug 24, 2010 @ 12:57
    Matt Brailsford
    1

    Hmmm,

     Looking through the source, the call to GetByDataTypeId(Guid DataTypeId) retrieves a list of all DataTypeDefinitions in the database and checks the control ID with the one you passed in, but further in the code, it does a lookup for a control with the same ID. This list of controls is populated by looking through DLL's, so it seems as though there is some inconcistency between what controls you have installed and what the DB thinks you have installed. Now because it's looking through everything, it might not actually be the upload field datatype that is missing, so I can only suggest to double check what data types you have registered in your DB, and to make sure you have the relevant DLLs in your Bin folder for them.

    Have you installed / uninstalled any third party data types? They may have deleted the DLL, but not the database entry, causing the issue.

    Matt

  • Jonas Eriksson 930 posts 1825 karma points
    Aug 25, 2010 @ 13:07
    Jonas Eriksson
    0

    Woo hoo! It sure was. Stupid of me - I should have thought of that.

    Going through the data types in the admn ui I saw "Multiple File Upload" was still there, thought I had deleted it the proper way. I hadn't. Got YSOD when trying to open the data type. Deleted it in the database (yes - everyone - be sure backup before deleting in the DB) in cmsDataType and the node in umbracoNode. Success.

    So DMO had nothing to do with it, thanks a lot for u taking time to help me out.

    Regards

    Jonas

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Aug 25, 2010 @ 13:08
    Matt Brailsford
    0

    Excellent,

    No problem, glad you have everything running smoothly.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft