Copied to clipboard

Flag this post as spam?

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


  • Tomasz Kowalski 135 posts 445 karma points
    May 16, 2017 @ 08:48
    Tomasz Kowalski
    0

    Missing Member default properties after update from 6.2 to 7.5.13

    Hi,

    We've updated an Umbraco site from 6.2 to 7.5.13 and we can see many warnings in umbraco log file about missing member properties such as "umbracoMemberApproved", "umbracoMemberLockedOut", etc.

    I know, that this properties were added automatically in Umbraco 6 by editing MemberType, but this doesn't happen in 7.5.

    Is there any solution to that? Or we just have to add all these properties manually in database?

    Any help appreciated :)

    Kind regards Tomasz

  • Simon Dingley 1470 posts 3427 karma points c-trib
    May 16, 2017 @ 09:29
    Simon Dingley
    0

    If, you were to click save on your member type in the back office it will create those missing properties...however, I would warn you that this can lead down a rocky road as I have recently found out when in a similar situation with a site I upgraded that had over 45,000 members!

    I have plans to blog about this at some point in the future but it could be way off, however, I just found the following in my notes for when I do come to write the post:

    Whatever you do don't follow the instructions in the warning!!!! Just hit save on your member type and the missing props will be generated. if you add a property as per the instruction you will kill the back office and won't be able to access the member type due to a duplicate property on the member type.

    You have been warned!!!

    From memory, what I think happened was that the member properties are created as expected BUT the corresponding property data is NOT which is what leads to all of the problems I encountered so DO try this locally first and backup backup backup.

    In case it helps you please also see the following script that I eventually assembled to get myself out of the hole I found myself in:

    -- umbracoMemberComments
    INSERT INTO [dbo].[cmsPropertyData]
               ([contentNodeId]
               ,[versionId]
               ,[propertytypeid]
               ,[dataInt]
               ,[dataDecimal]
               ,[dataDate]
               ,[dataNvarchar]
               ,[dataNtext])
    SELECT [contentNodeId],[versionId], 1214, null, null, null, null, null
        FROM [dbo].[cmsMember]
            INNER JOIN [dbo].[cmsPropertyData]
            ON [dbo].[cmsMember].[nodeId]=[dbo].[cmsPropertyData].[contentNodeId]
        GROUP BY [contentNodeId], [versionId]
    
    -- umbracoMemberFailedPasswordAttempts
        INSERT INTO [dbo].[cmsPropertyData]
               ([contentNodeId]
               ,[versionId]
               ,[propertytypeid]
               ,[dataInt]
               ,[dataDecimal]
               ,[dataDate]
               ,[dataNvarchar]
               ,[dataNtext])
    SELECT [contentNodeId],[versionId], 1215, null, null, null, null, null
        FROM [dbo].[cmsMember]
            INNER JOIN [dbo].[cmsPropertyData]
            ON [dbo].[cmsMember].[nodeId]=[dbo].[cmsPropertyData].[contentNodeId]
        GROUP BY [contentNodeId], [versionId]
    
    -- umbracoMemberApproved
            INSERT INTO [dbo].[cmsPropertyData]
               ([contentNodeId]
               ,[versionId]
               ,[propertytypeid]
               ,[dataInt]
               ,[dataDecimal]
               ,[dataDate]
               ,[dataNvarchar]
               ,[dataNtext])
    SELECT [contentNodeId],[versionId], 1216, 1, null, null, null, null
        FROM [dbo].[cmsMember]
            INNER JOIN [dbo].[cmsPropertyData]
            ON [dbo].[cmsMember].[nodeId]=[dbo].[cmsPropertyData].[contentNodeId]
        GROUP BY [contentNodeId], [versionId]
    
        -- umbracoMemberLockedOut
            INSERT INTO [dbo].[cmsPropertyData]
               ([contentNodeId]
               ,[versionId]
               ,[propertytypeid]
               ,[dataInt]
               ,[dataDecimal]
               ,[dataDate]
               ,[dataNvarchar]
               ,[dataNtext])
    SELECT [contentNodeId],[versionId], 1217, null, null, null, null, null
        FROM [dbo].[cmsMember]
            INNER JOIN [dbo].[cmsPropertyData]
            ON [dbo].[cmsMember].[nodeId]=[dbo].[cmsPropertyData].[contentNodeId]
        GROUP BY [contentNodeId], [versionId]
    
        -- umbracoMemberLastLockoutDate
                INSERT INTO [dbo].[cmsPropertyData]
               ([contentNodeId]
               ,[versionId]
               ,[propertytypeid]
               ,[dataInt]
               ,[dataDecimal]
               ,[dataDate]
               ,[dataNvarchar]
               ,[dataNtext])
    SELECT [contentNodeId],[versionId], 1218, null, null, null, null, null
        FROM [dbo].[cmsMember]
            INNER JOIN [dbo].[cmsPropertyData]
            ON [dbo].[cmsMember].[nodeId]=[dbo].[cmsPropertyData].[contentNodeId]
        GROUP BY [contentNodeId], [versionId]
    
        -- umbracoMemberLastLogin
                INSERT INTO [dbo].[cmsPropertyData]
               ([contentNodeId]
               ,[versionId]
               ,[propertytypeid]
               ,[dataInt]
               ,[dataDecimal]
               ,[dataDate]
               ,[dataNvarchar]
               ,[dataNtext])
    SELECT [contentNodeId],[versionId], 1219, null, null, null, null, null
        FROM [dbo].[cmsMember]
            INNER JOIN [dbo].[cmsPropertyData]
            ON [dbo].[cmsMember].[nodeId]=[dbo].[cmsPropertyData].[contentNodeId]
        GROUP BY [contentNodeId], [versionId]
    
        -- umbracoMemberLastPasswordChangeDate
                INSERT INTO [dbo].[cmsPropertyData]
               ([contentNodeId]
               ,[versionId]
               ,[propertytypeid]
               ,[dataInt]
               ,[dataDecimal]
               ,[dataDate]
               ,[dataNvarchar]
               ,[dataNtext])
    SELECT [contentNodeId],[versionId], 1220, null, null, null, null, null
        FROM [dbo].[cmsMember]
            INNER JOIN [dbo].[cmsPropertyData]
            ON [dbo].[cmsMember].[nodeId]=[dbo].[cmsPropertyData].[contentNodeId]
        GROUP BY [contentNodeId], [versionId]
    
        -- umbracoMemberPasswordRetrievalAnswer
                INSERT INTO [dbo].[cmsPropertyData]
               ([contentNodeId]
               ,[versionId]
               ,[propertytypeid]
               ,[dataInt]
               ,[dataDecimal]
               ,[dataDate]
               ,[dataNvarchar]
               ,[dataNtext])
    SELECT [contentNodeId],[versionId], 1221, null, null, null, null, null
        FROM [dbo].[cmsMember]
            INNER JOIN [dbo].[cmsPropertyData]
            ON [dbo].[cmsMember].[nodeId]=[dbo].[cmsPropertyData].[contentNodeId]
        GROUP BY [contentNodeId], [versionId]
    
        -- umbracoMemberPasswordRetrievalQuestion
                INSERT INTO [dbo].[cmsPropertyData]
               ([contentNodeId]
               ,[versionId]
               ,[propertytypeid]
               ,[dataInt]
               ,[dataDecimal]
               ,[dataDate]
               ,[dataNvarchar]
               ,[dataNtext])
    SELECT [contentNodeId],[versionId], 1222, null, null, null, null, null
        FROM [dbo].[cmsMember]
            INNER JOIN [dbo].[cmsPropertyData]
            ON [dbo].[cmsMember].[nodeId]=[dbo].[cmsPropertyData].[contentNodeId]
        GROUP BY [contentNodeId], [versionId]
    

    You will notice each subquery has an ID, that ID corresponds to the id in the database in the [cmsPropertyType] table for the relevant property.

    I hope this helps save you from at least some of the pain I experienced in this process.

    Cheers, Simon

  • Simon Dingley 1470 posts 3427 karma points c-trib
    May 16, 2017 @ 09:32
    Simon Dingley
    0

    ...and one other thing...even after fixing this I think I then discovered nobody could login still because the umbracoMemberApproved flag was false by default so I then had to run another script to update those values.

  • Tomasz Kowalski 135 posts 445 karma points
    May 16, 2017 @ 09:58
    Tomasz Kowalski
    0

    Hi Simon,

    and thank you for quick response.

    I'm aware of this problem that UmbracoMemberApproved is set to false by default. And I was fine with that Umbraco has added these new properties automaticcaly by itself. But I don't understand, why Umbraco 7.5 don't do it anymore?

    Thanks for SQL statements. I'll try them on the test site first.

    Kind regards Tomasz

  • Pramod Bhagat 9 posts 79 karma points
    Sep 27, 2018 @ 11:01
    Pramod Bhagat
    0

    Hi,

    I'm also facing the same issue after upgrade from 6.1.6 to 7.12.3.

    Was wondering if there was any resolution to this?

    Thanks,
    Pramod

Please Sign in or register to post replies

Write your reply to:

Draft