Copied to clipboard

Flag this post as spam?

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


  • Hemang Rajyaguru 5 posts 56 karma points
    Jul 31, 2013 @ 13:31
    Hemang Rajyaguru
    0

    Value cannot be null. Umbraco v6.1.2

    Hi,

    When i try to view the nodes in the Standard Values section i get the error below:

    Server Error in '/' Application.

    Value cannot be null.
    Parameter name: Property lightOrDarkBackground (218) on Content Type Master could not be retrieved for Document 1610 on Tab Page Page Images. To fix this problem, delete the property and recreate it.

    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.ArgumentNullException: Value cannot be null.
    Parameter name: Property lightOrDarkBackground (218) on Content Type Master could not be retrieved for Document 1610 on Tab Page Page Images. To fix this problem, delete the property and recreate it.

    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: 

    [ArgumentNullException: Value cannot be null.
    Parameter name: Property lightOrDarkBackground (218) on Content Type Master could not be retrieved for Document 1610 on Tab Page Page Images. To fix this problem, delete the property and recreate it.]
       umbraco.controls.ContentControl.LoadPropertyTypes(IContentTypeComposition contentType, TabPage tabPage, Hashtable inTab, Int32 tabId, String tabCaption) +751
       umbraco.controls.ContentControl.CreateChildControls() +710
       System.Web.UI.Control.EnsureChildControls() +189
       umbraco.controls.ContentControl.OnInit(EventArgs e) +51
       System.Web.UI.Control.InitRecursive(Control namingContainer) +186
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +189
       Sitereactor.StandardValues.EditStandardValue.OnInit(EventArgs e) +1135
       System.Web.UI.Control.InitRecursive(Control namingContainer) +186
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2098

     

    I have tried recreating the properties as suggested to no success and also tried clearing the entire cache with no success either.

    This seems to be a common problem here, does anyone have a solution to this? I think it's breaking courier as well. It was working before so I do not know what has changed.

    Thanks

    Hemang

     

     

     

     

  • Hemang Rajyaguru 5 posts 56 karma points
    Aug 05, 2013 @ 12:48
    Hemang Rajyaguru
    0

    Does anyone have any ideas on this? I have updated it to the latest standard values package with the same result.

    Thanks


    Hemang 

  • Hemang Rajyaguru 5 posts 56 karma points
    Aug 12, 2013 @ 13:20
    Hemang Rajyaguru
    101

    I deleted the values from the standard values table which were problematic and recreated them and that solved the problem. It's not ideal but it worked.

    Thanks


    Hemang

  • Mark Mitchell 35 posts 60 karma points
    Aug 26, 2013 @ 15:50
    Mark Mitchell
    0

    Hi Hemang,  Can you please be more specific on how you fixed this?  I am having the same issue after adding some additional fields to a document type.

    I have looked in the StandardValues table, but there is just two collumns, A docTypeId and a nodeId. I am not sure how to know which ones to delete, or how to recreate them.

    Thanks!

    Mark

  • Jeremy Pyne 106 posts 246 karma points MVP c-trib
    Oct 03, 2013 @ 19:42
    Jeremy Pyne
    0

    I have posted source code fixes for this bug (and another critical bug on new umbraco versions) here.

    Or you can jsut replace you bianary with this one (version 6 only). https://www.dropbox.com/s/7zi1maeinv583v0/Sitereactor.StandardValues.dll

  • Gary Bond 13 posts 36 karma points
    Nov 28, 2013 @ 14:11
    Gary Bond
    0

    Thanks Jeremy. That was a great help to me too. (V6.1.6)

  • Jørgen Bakke Eriksen 44 posts 95 karma points
    Jan 16, 2014 @ 09:50
    Jørgen Bakke Eriksen
    1

    Thought I would share our findings about this error message.

    Note that these findings apply to a locally hosted solution. In the case of a cloud hosted solution you will likely need some assistance from the hosting provider if that is possible.

    This is an error message that will occur under certain circumstances when trying to open a document backend. Most solutions I have seen follows the advice to delete and recreate the property. However, in most real world scenarios with values already saved for the property in question this is not the preferable solution.

    We have so far discovered the following scenarios and the corresponding solutions to this error:

    1. concurrent structural DB-changes
    2. Missing property in CMSPropertyData
    3. Missing row in CMSContentVersion

    1. will be caused in situations where you have several developers doing concurrent, independent structural changes to the database like adding a property to a document type. This is usually solved in one of two ways:

    • Restart the application pool in the IIS running the web app
    • Touch the web.config in order to restart the web app

    This will lead to cache invalidation and a rebuild of the app pool.

    2. is solved by a bulk update of CMSPropertyData table with the missing property for the document type in question. You will find a script which updates CMSPropertyData below. You have to find the id for the Document type and Property type in question and replace the values in the script with your values.

     

    -- Usage:
    -- Make sure you change the ID of the ContentType and PropertyType
    
    set implicit_transactions on
    set identity_insert cmsPropertyData on
    begin
        declare @iid int
        declare @id int
        declare @versionid varchar(200)
    
        declare contentType cursor 
        for 
            --Update this with the ID of the contenttype to add propertyData for by selecting from cmsContentType: select * from cmsContentType
            select nodeid from cmsContent where contentType = 1033
        -- opening cursor 
        open contentType 
        -- get first result from table 
        fetch next from contentType into @iid
        -- loop until there are no rows left 
        while @@fetch_status = 0 
        begin
            SELECT @id = IDENT_CURRENT('cmspropertydata') + IDENT_INCR('cmspropertydata') 
            select @versionid = versionid from cmsPropertyData where contentNodeId = @iid
    
            --Update this with the ID of the propertyType to add by selecting from cmsPropertyType: select * from cmsPropertyType where name = ''
            insert into dbo.cmsPropertyData (id, contentNodeId, versionId, propertytypeid, dataInt, dataDate, dataNvarchar, dataNtext) values (@id, @iid, @versionid, 215, NULL, NULL, NULL, NULL)
    
            -- get next result 
            fetch next from contentType into @iid 
        end
        -- closing cursor 
        close contentType 
        -- removing it from sql server memory 
    deallocate contentType
    end
    
    --set implicit_transactions off
    --set identity_insert cmsPropertyData off
    
    --commit

    Note that the statements for turning off implicit_transactions and identity_insert is and committing the changes is commented out. you should inspect the result of the update before manually committing the changes. 

    3. will typically occur after a DB cleanup like deleting all old version but the newest (CMSDocument.newest = 0). If you are not careful you could end up deleting too much from CMSContentVersion. This happened to us with the user Document Type, leading to ysod when trying to open the members on the web app.

    However this is easily solved be adding back a row for every instance of the Document type in question to CMSContentVersion. The example below illustrates an update of CMSContentVersion. Here we use restored backup taken before the version cleanup to get back correct versions for the Member Document type. You could deduct the correct versionIds from CMSPropertyData or CMSDocument if you don't have a backup. 

    declare @ContentId int
    declare @versionId varchar(500)
    declare @versiondate datetime
    
    set implicit_transactions on
    set identity_insert cmscontentversion on
    
    --DEFINE THE CURSOR HERE
    DECLARE c CURSOR FOR
    select v.ContentId, v.VersionId, v.VersionDate from [2014_01_15].dbo.cmsContentVersion v, [2014_01_15].dbo.cmsContent c where c.nodeId = v.ContentId and c.contentType = 1116 and not v.ContentId = 1175
    --select v.ContentId, v.VersionId, v.VersionDate from cmsContentVersion v, cmsContent c where c.nodeId = v.ContentId and c.contentType = 1116 and not v.ContentId = 1175
    
    OPEN c
    --SET LOOP VARIABLES
    FETCH NEXT FROM c INTO @contentid, @versionid, @versiondate
    WHILE @@FETCH_STATUS = 0 
    
    BEGIN 
        --do work here
        declare @id int
    
        SELECT @id = IDENT_CURRENT('cmscontentversion') + IDENT_INCR('cmsContentversion')
    
        insert into cmscontentversion (id, ContentId, VersionId, VersionDate, LanguageLocale) values (@id, @ContentId, @versionid, @versiondate,null)
    
    --UPDATE LOOP VARIABLES
    FETCH NEXT FROM c INTO @contentid, @versionid, @versiondate
    
    
    END
    CLOSE c 
    DEALLOCATE c
    --End template
    
    --set implicit_transactions off
    --set identity_insert cmscontentversion off
    --commit
    
    Note that the statements for turning off implicit_transactions and identity_insert is and committing the changes is commented out. you should inspect the result of the update before manually committing the changes. 
  • Kim Gordon 7 posts 36 karma points
    Apr 03, 2014 @ 10:54
    Kim Gordon
    0

    Thanks Jørgen

    Your number 2 solution solved my problem :)
    Just in case that some people can see where they should change the id's I have tried to make it more clear :)

    -- Usage:
    -- Make sure you change the ID of the ContentType and PropertyType
    
    set implicit_transactions on
    set identity_insert cmsPropertyData on
    begin
        declare @iid int
        declare @id int
        declare @versionid varchar(200)
    
        declare contentType cursor 
        for 
            --Update this with the ID of the contenttype to add propertyData for by selecting from cmsContentType: select * from cmsContentType
            select nodeid from cmsContent where contentType = [**HERE YOU SHOULD INSERT YOUR OWN ID**]
        -- opening cursor 
        open contentType 
        -- get first result from table 
        fetch next from contentType into @iid
        -- loop until there are no rows left 
        while @@fetch_status = 0 
        begin
            SELECT @id = IDENT_CURRENT('cmspropertydata') + IDENT_INCR('cmspropertydata') 
            select @versionid = versionid from cmsPropertyData where contentNodeId = @iid
    
            --Update this with the ID of the propertyType to add by selecting from cmsPropertyType: select * from cmsPropertyType where name = ''
            insert into dbo.cmsPropertyData (id, contentNodeId, versionId, propertytypeid, dataInt, dataDate, dataNvarchar, dataNtext) values (@id, @iid, @versionid, [**HERE YOU SHOULD INSERT YOUR OWN ID**], NULL, NULL, NULL, NULL)
    
            -- get next result 
            fetch next from contentType into @iid 
        end
        -- closing cursor 
        close contentType 
        -- removing it from sql server memory 
    deallocate contentType
    end
    
    --set implicit_transactions off
    --set identity_insert cmsPropertyData off
    
    --commit
    
  • Thomas Beckert 193 posts 469 karma points
    Jun 28, 2014 @ 01:19
    Thomas Beckert
    0

    Had the same issue.

    Opened the DocumentType that was mentioned in the error message, just save it again without changing anything and it worked again.

  • Jørgen Bakke Eriksen 44 posts 95 karma points
    Jun 30, 2014 @ 08:07
    Jørgen Bakke Eriksen
    0

    Yes of course Thomas, that works. My scripts was for the situations where you have tens of thousands of documents that suffer from on of these conditions. Then opening av saving becomes somewhat demoralizing ;-)

  • Thomas Beckert 193 posts 469 karma points
    Jun 30, 2014 @ 08:10
    Thomas Beckert
    0

    Good point. ;-)

  • Graham Roe 3 posts 23 karma points
    Jul 03, 2014 @ 18:25
    Graham Roe
    1

    I had this problem after upgrading from 6.0.5 to 6.2.1. It was caused by a document type property with a dash in the alias. 

    The solution was to resave the document type and change any impacted code to reference the new property alias. 

     

     

  • Dallas 132 posts 404 karma points
    Nov 04, 2014 @ 04:37
    Dallas
    0

    Hopefully this can help someone - another cause of this error.

    We were getting this error on a development computer. After some trial and error we discovered that the issue was that the property referred to in the error was using a DAMP datatype. The DigibizAdvancedMediaPicker.dll was not in the bin directory.

    Once we copied the dll into the bin directory we started getting errors describing that the digibizTree.dll was missing and that the DAMP usercontrol was missing. We copied over the two dll files and the DAMP directory (DigibizAdvancedMediaPicker) to \umbraco\plugins and the error went away. We were now able to view the document. 

    Dallas

  • Cesar Scur 2 posts 73 karma points
    Dec 30, 2015 @ 10:30
    Cesar Scur
    0

    Had this error after updating manually from 7.2 to 7.3. The error appeared only when accessing the admin.

    Solution: Clearing the browser cookies for the site.

  • Nitin Anand 46 posts 178 karma points
    Mar 16, 2017 @ 14:31
    Nitin Anand
    0

    I had similar problem when i tried to copy data from local sql db . All worked well in Local DB but similar database on another server didnt let me change any content and threw null value insertion error.

    I solved my problem by converting local sql db to compact edition sql i.e. you get .sdf file. Once can convert this using the sqlcompacttoolbox.

    The database created when i use the script from .sdf db file is stable and working at its best.

Please Sign in or register to post replies

Write your reply to:

Draft