Excessive amount of log entries with new Member model in v6.2
Debugging with logging enabled, I'm receiving for every call several sets of the following:
2014-05-27 11:18:39,727 [101] WARN Umbraco.Core.Models.Member - [Thread 85] An attempt was made to set a value on the property 'LastLoginDate' on type Umbraco.Core.Models.Member but the property type umbracoMemberLastLogin does not exist on the member type, ensure that this property type exists so that setting this property works correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'PasswordQuestion' property on Umbraco.Core.Models.Member but the umbracoMemberPasswordRetrievalQuestion property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberPasswordRetrievalQuestion configured on your member type in order to use the 'PasswordQuestion' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'Comments' property on Umbraco.Core.Models.Member but the umbracoMemberComments property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberComments configured on your member type in order to use the 'Comments' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'IsApproved' property on Umbraco.Core.Models.Member but the umbracoMemberApproved property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberApproved configured on your member type in order to use the 'IsApproved' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'IsLockedOut' property on Umbraco.Core.Models.Member but the umbracoMemberLockedOut property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberLockedOut configured on your member type in order to use the 'IsLockedOut' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'LastLoginDate' property on Umbraco.Core.Models.Member but the umbracoMemberLastLogin property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberLastLogin configured on your member type in order to use the 'LastLoginDate' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'LastLoginDate' property on Umbraco.Core.Models.Member but the umbracoMemberLastLogin property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberLastLogin configured on your member type in order to use the 'LastLoginDate' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'LastPasswordChangeDate' property on Umbraco.Core.Models.Member but the umbracoMemberLastPasswordChangeDate property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberLastPasswordChangeDate configured on your member type in order to use the 'LastPasswordChangeDate' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'LastLockoutDate' property on Umbraco.Core.Models.Member but the umbracoMemberLastLockoutDate property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberLastLockoutDate configured on your member type in order to use the 'LastLockoutDate' property on the model correctly.
I ended up fixing this by adding a dummy property to my existing member type. This triggers Umbraco to automatically add the missing member properties.
IMPORTANT NOTE: When Umbraco automatically adds the missing properties to the member type, the umbracoMemberApproved property for all existing members of that type is set to FALSE. So members will not be able to log in until you manually set the property for each member to TRUE. In my case there were only a dozen members in the database, but if you have tons of members in the database this will be an issue! Newly created members will have the umbracoMemberApproved property set to TRUE.
Thank you Arjan, I can confirm that your workaround worked for me, too. I had 800+ members, so I updated all users' umbracoMemberApproved property in the database with an UPDATE. I found the relevant property type id in table cmsPropertyType, and the member properties themselves are stored in table cmsPropertyData.
edit: I also had to go into the Members section in back office and expand the folders containing all the members, seems like that established the new properties in the database.
Good to hear that, Steve. I initially did the same thing (updating the values directly in the database), but in my case the umbracoMemberApproved values appeared to be cached by Umbraco, so members were still unable to log in. I had to manually hit the "Save" button on each member in the Umbraco backend to recycle the member cache.
Did you double-check if members were in fact able to log in again? Did you do anything to recycle the Umbraco cache (app pool recycle, IIS reset, etc.)?
You're right, my first attempt didn't actually work. Second time around I went into the Members section in back office and noticed when I expanded each folder containing the members, there were new values being inserted into the cmsPropertyData table. Then, my UPDATE worked as intended.
I would only recommend this if you're confident changing your database, because step 1 will lock your members out until they're approved either manually in back office members section, or with SQL update described below
add a new dummy property to your Member Type in Members section of back office to create all the missing member properties in table cmsPropertyType
in back office Members section, opening all the member folders (a-z, other) inserts records into cmsPropertyData with null values for the properties established in step 1
now we can do a SQL update on those records in table cmsPropertyData where the propertyTypeId field matches the id for umbracoMemberApproved in cmsPropertyType table
Awesome! With this workaround it should be safe to upgrade to the new Membership provider, or get rid of those errors when you continue to use the old Membership provider.
After upgrading from 4.x to 7.2 I had to same problem, only I had no umbracoMemberApproved data in cmsPropertyData. So I updated all members programmatically:
var memberService = UmbracoContext.Current.Application.Services.MemberService; int totalRecords; var members = memberService.GetAll(0, 99999, out totalRecords); foreach (var member in members) { member.IsApproved = true; memberService.Save(member, false); }
I'm tearing my hair out with this issue right now. I have a large membership database in a site that was upgraded and is currently running 7.5.2, it was working fine until the new properties were automatically added and now members cannot login. It is impossible to save members in the back office and it is impossible to save them programatically and the reason seems to be that although the properties were added no property data was and so all of the id's are zero and as such causes exceptions like this to be continually thrown.
2017-04-23 00:24:44,534 [P17440/D13/T102] ERROR System.String - The given key was not present in the dictionary.
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.Core.Persistence.Repositories.MemberRepository.PersistUpdatedItem(IMember entity) in D:\Repositories\Umbraco-CMS\src\Umbraco.Core\Persistence\Repositories\MemberRepository.cs:line 368
at Umbraco.Core.Cache.DefaultRepositoryCachePolicy`2.CreateOrUpdate(TEntity entity, Action`1 persistMethod) in D:\Repositories\Umbraco-CMS\src\Umbraco.Core\Cache\DefaultRepositoryCachePolicy.cs:line 80
at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.PersistUpdatedItem(IEntity entity) in D:\Repositories\Umbraco-CMS\src\Umbraco.Core\Persistence\Repositories\RepositoryBase.cs:line 253
at Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit(Action`1 transactionCompleting) in D:\Repositories\Umbraco-CMS\src\Umbraco.Core\Persistence\UnitOfWork\PetaPocoUnitOfWork.cs:line 118
at Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit() in D:\Repositories\Umbraco-CMS\src\Umbraco.Core\Persistence\UnitOfWork\PetaPocoUnitOfWork.cs:line 92
at Umbraco.Core.Services.MemberService.Save(IMember entity, Boolean raiseEvents) in D:\Repositories\Umbraco-CMS\src\Umbraco.Core\Services\MemberService.cs:line 992
at ASP._Page_Views_Help_cshtml.Execute() in d:\Repositories\<customer>\<project>\src\www\Views\Help.cshtml:line 17
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
Any help or ideas on overcoming this would be appreciated.
After a lot of trial an error I eventually pieced together a script with help from other sources that allowed me to insert the missing data. The script is below and is provided without warranty so backup and test before using in production:
-- 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]
Excessive amount of log entries with new Member model in v6.2
Debugging with logging enabled, I'm receiving for every call several sets of the following:
2014-05-27 11:18:39,727 [101] WARN Umbraco.Core.Models.Member - [Thread 85] An attempt was made to set a value on the property 'LastLoginDate' on type Umbraco.Core.Models.Member but the property type umbracoMemberLastLogin does not exist on the member type, ensure that this property type exists so that setting this property works correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'PasswordQuestion' property on Umbraco.Core.Models.Member but the umbracoMemberPasswordRetrievalQuestion property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberPasswordRetrievalQuestion configured on your member type in order to use the 'PasswordQuestion' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'Comments' property on Umbraco.Core.Models.Member but the umbracoMemberComments property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberComments configured on your member type in order to use the 'Comments' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'IsApproved' property on Umbraco.Core.Models.Member but the umbracoMemberApproved property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberApproved configured on your member type in order to use the 'IsApproved' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'IsLockedOut' property on Umbraco.Core.Models.Member but the umbracoMemberLockedOut property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberLockedOut configured on your member type in order to use the 'IsLockedOut' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'LastLoginDate' property on Umbraco.Core.Models.Member but the umbracoMemberLastLogin property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberLastLogin configured on your member type in order to use the 'LastLoginDate' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'LastLoginDate' property on Umbraco.Core.Models.Member but the umbracoMemberLastLogin property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberLastLogin configured on your member type in order to use the 'LastLoginDate' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'LastPasswordChangeDate' property on Umbraco.Core.Models.Member but the umbracoMemberLastPasswordChangeDate property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberLastPasswordChangeDate configured on your member type in order to use the 'LastPasswordChangeDate' property on the model correctly.
2014-05-27 11:18:39,737 [101] WARN Umbraco.Core.Models.Member - [Thread 85] Trying to access the 'LastLockoutDate' property on Umbraco.Core.Models.Member but the umbracoMemberLastLockoutDate property does not exist on the member type so a default value is returned. Ensure that you have a property type with alias: umbracoMemberLastLockoutDate configured on your member type in order to use the 'LastLockoutDate' property on the model correctly.
I'm noticing the same thing in Umbraco 6.2.1; anyone have any ideas how we can cut down on these being logged?
I'm noticing the same thing also.. I'm also upgrade to umbraco 6.2.1
I'm having the same issue as well. I'm seeing about logging an issue. I'll post back here if I find anything out.
Issue is still present in version 6.2.4.
Anyone dealing with the same issue? Please vote for the issue here: http://issues.umbraco.org/issue/U4-5341
I ended up fixing this by adding a dummy property to my existing member type. This triggers Umbraco to automatically add the missing member properties.
IMPORTANT NOTE: When Umbraco automatically adds the missing properties to the member type, the umbracoMemberApproved property for all existing members of that type is set to FALSE. So members will not be able to log in until you manually set the property for each member to TRUE. In my case there were only a dozen members in the database, but if you have tons of members in the database this will be an issue! Newly created members will have the umbracoMemberApproved property set to TRUE.
Thank you Arjan, I can confirm that your workaround worked for me, too. I had 800+ members, so I updated all users' umbracoMemberApproved property in the database with an UPDATE. I found the relevant property type id in table cmsPropertyType, and the member properties themselves are stored in table cmsPropertyData.
edit: I also had to go into the Members section in back office and expand the folders containing all the members, seems like that established the new properties in the database.
Good to hear that, Steve. I initially did the same thing (updating the values directly in the database), but in my case the umbracoMemberApproved values appeared to be cached by Umbraco, so members were still unable to log in. I had to manually hit the "Save" button on each member in the Umbraco backend to recycle the member cache.
Did you double-check if members were in fact able to log in again? Did you do anything to recycle the Umbraco cache (app pool recycle, IIS reset, etc.)?
You're right, my first attempt didn't actually work. Second time around I went into the Members section in back office and noticed when I expanded each folder containing the members, there were new values being inserted into the cmsPropertyData table. Then, my UPDATE worked as intended.
I would only recommend this if you're confident changing your database, because step 1 will lock your members out until they're approved either manually in back office members section, or with SQL update described below
Awesome! With this workaround it should be safe to upgrade to the new Membership provider, or get rid of those errors when you continue to use the old Membership provider.
After upgrading from 4.x to 7.2 I had to same problem, only I had no umbracoMemberApproved data in cmsPropertyData. So I updated all members programmatically:
Cheers
Bjørn
I'm on the latest 7.4.3 version and have logs full of this warnings.
I'm using custom member type, what's with this 'umbraco' prefixes? I don't need and don't have any of those properties. How can I get rid of this?
I tried to add a dummy property to my existing member type, but that didn't help.
Can someone from HQ comment on this issue as it's 2 years old now?
Thanks!
I'm tearing my hair out with this issue right now. I have a large membership database in a site that was upgraded and is currently running 7.5.2, it was working fine until the new properties were automatically added and now members cannot login. It is impossible to save members in the back office and it is impossible to save them programatically and the reason seems to be that although the properties were added no property data was and so all of the id's are zero and as such causes exceptions like this to be continually thrown.
Any help or ideas on overcoming this would be appreciated.
Thanks
After a lot of trial an error I eventually pieced together a script with help from other sources that allowed me to insert the missing data. The script is below and is provided without warranty so backup and test before using in production:
is working on a reply...