"Database mapped field does not exist" after migra

Posted by Community Admin on 05-Aug-2018 19:49

"Database mapped field does not exist" after migration

All Replies

Posted by Community Admin on 21-Nov-2012 00:00

Hi,

I've just had a peculiar error with the latest version of SF 5, just after completing a migration progress from a 3.7 site. I get this error when I try to log in; as a result, I'm no longer able to access to Dashboard or the backend. I figure it's because I forgot to add "en" (non-localized english) as a language to the project before migrating, but I'd like to know if there's any way I could get around this problem without having to start the migration from scratch.

EDIT: After trying on another computer, I got the same error but with a different culture in the field name ("UrlName_en_ca" instead of "UrlName_en_gb"), which made me think the issue was browser-specific. Turns out that was the case: as soon as I switched the dominant language in my browser to non-localized english ("en"), I was able to gain access to the Dashboard again. I see a problem with this though—will I have to warn everyone who wants to access the backend that they'll have to change the language settings in their browser? Seems like a bug to me. Can anyone confirm that this is happening? Any ideas on how to fix it?


Full error message:


Database mapped field does not exist.
Parameter name: methodCallExpression
Actual value was p.FieldValue("UrlName_en_gb").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.ArgumentOutOfRangeException: Database mapped field does not exist.
Parameter name: methodCallExpression
Actual value was p.FieldValue("UrlName_en_gb").

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: 

[ArgumentOutOfRangeException: Database mapped field does not exist.
Parameter name: methodCallExpression
Actual value was p.FieldValue("UrlName_en_gb").]
Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQueryImpl(Type resultType, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid) +1123
Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid) +57

[InvalidOperationException: An exception occured during the execution of 'Extent<Telerik.Sitefinity.Pages.Model.PageNode>().Where(c => (c.ApplicationName == value(Telerik.Sitefinity.Modules.Pages.Data.OpenAccessPageProvider+<>c__DisplayClass2).appName)).Where(p => ((p.Parent.Id == value(Telerik.Sitefinity.Web.SiteMapBase+<>c__DisplayClass8).parentId) AndAlso (((p.FieldValue("UrlName_en_gb") == value(Telerik.Sitefinity.Web.SiteMapBase+<>c__DisplayClass6).urlName) OrElse (p.FieldValue("UrlName_en") == "Sitefinity")) OrElse (p.FieldValue("UrlName_") == "Sitefinity"))))'. Failure: Database mapped field does not exist.
Parameter name: methodCallExpression
Actual value was p.FieldValue("UrlName_en_gb").
See InnerException for more details.
Complete Expression:
.Call System.Linq.Queryable.Where(
.Call System.Linq.Queryable.Where(
.Constant<Telerik.OpenAccess.Query.ExtentQueryImpl`1[Telerik.Sitefinity.Pages.Model.PageNode]>(Extent<Telerik.Sitefinity.Pages.Model.PageNode>()),
'(.Lambda #Lambda1<System.Func`2[Telerik.Sitefinity.Pages.Model.PageNode,System.Boolean]>)),
'(.Lambda #Lambda2<System.Func`2[Telerik.Sitefinity.Pages.Model.PageNode,System.Boolean]>))

.Lambda #Lambda1<System.Func`2[Telerik.Sitefinity.Pages.Model.PageNode,System.Boolean]>(Telerik.Sitefinity.Pages.Model.PageNode $c)

$c.ApplicationName == .Constant<Telerik.Sitefinity.Modules.Pages.Data.OpenAccessPageProvider+<>c__DisplayClass2>(Telerik.Sitefinity.Modules.Pages.Data.OpenAccessPageProvider+<>c__DisplayClass2).appName


.Lambda #Lambda2<System.Func`2[Telerik.Sitefinity.Pages.Model.PageNode,System.Boolean]>(Telerik.Sitefinity.Pages.Model.PageNode $p)

($p.Parent).Id == .Constant<Telerik.Sitefinity.Web.SiteMapBase+<>c__DisplayClass8>(Telerik.Sitefinity.Web.SiteMapBase+<>c__DisplayClass8).parentId
&& (.Call Telerik.OpenAccess.ExtensionMethods.FieldValue(
$p,
"UrlName_en_gb") == .Constant<Telerik.Sitefinity.Web.SiteMapBase+<>c__DisplayClass6>(Telerik.Sitefinity.Web.SiteMapBase+<>c__DisplayClass6).urlName
|| .Call Telerik.OpenAccess.ExtensionMethods.FieldValue(
$p,
"UrlName_en") == "Sitefinity" || .Call Telerik.OpenAccess.ExtensionMethods.FieldValue(
$p,
"UrlName_") == "Sitefinity")

]
Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid) +377
Telerik.OpenAccess.Query.ExpressionExecution.PerformDatabaseQuerySingle(ChainedContext context, Expression expression, QueryableCategory before, Int32& found, Int32 elemAt, Boolean single, Boolean diffType) +248
Telerik.OpenAccess.Query.ExpressionExecution.PerformQuerySingle(ExpressionCutter cutter, MethodCallExpression mce, ChainedContext piece) +1232
Telerik.OpenAccess.Query.Piece`1.ExecuteSingle(Expression expression) +238

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +251
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
Telerik.OpenAccess.Query.Piece`1.System.Linq.IQueryProvider.Execute(Expression expr) +426
Telerik.Sitefinity.Data.Linq.OpenAccess.OpenAccessQueryProvider`2.Execute(Expression expression) +125
Telerik.Sitefinity.Data.Linq.OpenAccess.OpenAccessQueryProvider`2.System.Linq.IQueryProvider.Execute(Expression expression) +15
System.Linq.Queryable.FirstOrDefault(IQueryable`1 source, Expression`1 predicate) +300
Telerik.Sitefinity.Web.SiteMapBase.GetChildNode(PageSiteNode parent, String urlName) +1147
Telerik.Sitefinity.Web.SiteMapBase.ResolveNode(String[] segments, PageSiteNode parent, String expectedExtension, Int32 extensionSegmentIndex, Int32& regularNodesCount, String[]& additionalUrls) +76
Telerik.Sitefinity.Web.SiteMapBase.FindSiteMapNode(String rawUrl, Boolean ifAccessible, Boolean& isAdditionalUrl, String[]& urlParameters) +888
Telerik.Sitefinity.Web.SiteMapBase.FindSiteMapNode(String rawUrl, Boolean ifAccessible) +34
Telerik.Sitefinity.Web.SiteMapBase.FindSiteMapNode(String rawUrl) +12
System.Web.SiteMapProvider.FindSiteMapNode(HttpContext context) +56
System.Web.SiteMapProvider.get_CurrentNode() +56
Telerik.Sitefinity.Web.SiteMapBase.get_CurrentNode() +138
Telerik.Sitefinity.Clients.JS.PageStatisticsJSClient.GenerateScript() +20
Telerik.Sitefinity.Clients.JS.PageStatisticsJSClient.Render(HtmlTextWriter writer) +64
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

Posted by Community Admin on 23-Nov-2012 00:00

Hello Dan,

That's a very strange behavior, indeed. We have tried reproducing it on several projects, using browser locale different than the cultures configured in Sitefinity, however the behavior has been consistently working.

It looks like the sitemap provider is trying to resolve a node for a culture that it doesn't have translation (the browser culture).

Would it be possible to let us know if you have managed to isolate any further steps for reproducing the problem so we can verify this issue locally?

Thank you in advance for the kind cooperation.

Regards,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed