Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find a value for configuration field '{ConfigField}' #11488

Closed
bjarnef opened this issue Oct 25, 2021 · 6 comments
Closed

Could not find a value for configuration field '{ConfigField}' #11488

bjarnef opened this issue Oct 25, 2021 · 6 comments
Labels
status/stale Marked as stale due to inactivity type/bug

Comments

@bjarnef
Copy link
Contributor

bjarnef commented Oct 25, 2021

Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8

9.0.1

Bug summary

When working with Contentment v3.0.0 and Umbraco v9.0.1 I got these warnings in log file:

{"@t":"2021-10-25T13:30:35.3512427Z","@mt":"Could not find a value for configuration field '{ConfigField}'","@l":"Warning","ConfigField":"preview","SourceContext":"Umbraco.Cms.Core.Models.Mapping.DataTypeMapDefinition","ActionId":"2eef8bc2-65e5-48d6-bf31-a53eba71d4ab","ActionName":"Umbraco.Cms.Web.BackOffice.Controllers.DataTypeController.GetById (Umbraco.Web.BackOffice)","RequestId":"0HMCNNDPSPKGD:000001DF","RequestPath":"/umbraco/backoffice/umbracoapi/datatype/GetById","ConnectionId":"0HMCNNDPSPKGD","ProcessId":18156,"ProcessName":"UmbracoProject","ThreadId":31,"AppDomainId":1,"AppDomainAppId":"65ffeee9778a120d6cbdf3a5f87bfe043e30dcbe","MachineName":"LAPTOP-TVMJ2DRH","Log4NetLevel":"WARN ","HttpRequestId":"682d7889-a489-4298-bee8-ddbff1d7a0e7","HttpRequestNumber":7,"HttpSessionId":"dfdef498-0c24-ccb8-9862-2e24402bea2a"}
{"@t":"2021-10-25T13:30:36.4993432Z","@mt":"Could not find a value for configuration field '{ConfigField}'","@l":"Warning","ConfigField":"preview","SourceContext":"Umbraco.Cms.Core.Models.Mapping.DataTypeMapDefinition","ActionId":"2eef8bc2-65e5-48d6-bf31-a53eba71d4ab","ActionName":"Umbraco.Cms.Web.BackOffice.Controllers.DataTypeController.GetById (Umbraco.Web.BackOffice)","RequestId":"0HMCNNDPSPKGD:000001E3","RequestPath":"/umbraco/backoffice/umbracoapi/datatype/GetById","ConnectionId":"0HMCNNDPSPKGD","ProcessId":18156,"ProcessName":"UmbracoProject","ThreadId":31,"AppDomainId":1,"AppDomainAppId":"65ffeee9778a120d6cbdf3a5f87bfe043e30dcbe","MachineName":"LAPTOP-TVMJ2DRH","Log4NetLevel":"WARN ","HttpRequestId":"1b9e614d-9f90-45b8-be41-c605e26284ff","HttpRequestNumber":8,"HttpSessionId":"a63717eb-1b1f-d2ed-c24f-3a4103c8062d"}
{"@t":"2021-10-25T13:30:38.6210026Z","@mt":"Could not find a value for configuration field '{ConfigField}'","@l":"Warning","ConfigField":"preview","SourceContext":"Umbraco.Cms.Core.Models.Mapping.DataTypeMapDefinition","ActionId":"2eef8bc2-65e5-48d6-bf31-a53eba71d4ab","ActionName":"Umbraco.Cms.Web.BackOffice.Controllers.DataTypeController.GetById (Umbraco.Web.BackOffice)","RequestId":"0HMCNNDPSPKGD:000001E7","RequestPath":"/umbraco/backoffice/umbracoapi/datatype/GetById","ConnectionId":"0HMCNNDPSPKGD","ProcessId":18156,"ProcessName":"UmbracoProject","ThreadId":41,"AppDomainId":1,"AppDomainAppId":"65ffeee9778a120d6cbdf3a5f87bfe043e30dcbe","MachineName":"LAPTOP-TVMJ2DRH","Log4NetLevel":"WARN ","HttpRequestId":"57c7584f-31e6-4e9c-bb45-26a119fe74b7","HttpRequestNumber":9,"HttpSessionId":"d2e010f0-fbc6-635a-3bfd-df2f3740d505"}
{"@t":"2021-10-25T13:30:40.0273770Z","@mt":"Could not find a value for configuration field '{ConfigField}'","@l":"Warning","ConfigField":"preview","SourceContext":"Umbraco.Cms.Core.Models.Mapping.DataTypeMapDefinition","ActionId":"2eef8bc2-65e5-48d6-bf31-a53eba71d4ab","ActionName":"Umbraco.Cms.Web.BackOffice.Controllers.DataTypeController.GetById (Umbraco.Web.BackOffice)","RequestId":"0HMCNNDPSPKGD:000001EB","RequestPath":"/umbraco/backoffice/umbracoapi/datatype/GetById","ConnectionId":"0HMCNNDPSPKGD","ProcessId":18156,"ProcessName":"UmbracoProject","ThreadId":59,"AppDomainId":1,"AppDomainAppId":"65ffeee9778a120d6cbdf3a5f87bfe043e30dcbe","MachineName":"LAPTOP-TVMJ2DRH","Log4NetLevel":"WARN ","HttpRequestId":"268d2605-32c8-4b62-9457-a3556195a069","HttpRequestNumber":10,"HttpSessionId":"e249e6dd-1ed5-fea5-391f-7df953ce7ec5"}
{"@t":"2021-10-25T13:30:48.7331004Z","@mt":"Could not find a value for configuration field '{ConfigField}'","@l":"Warning","ConfigField":"preview","SourceContext":"Umbraco.Cms.Core.Models.Mapping.DataTypeMapDefinition","ActionId":"2eef8bc2-65e5-48d6-bf31-a53eba71d4ab","ActionName":"Umbraco.Cms.Web.BackOffice.Controllers.DataTypeController.GetById (Umbraco.Web.BackOffice)","RequestId":"0HMCNNDPSPKGD:000001F1","RequestPath":"/umbraco/backoffice/umbracoapi/datatype/GetById","ConnectionId":"0HMCNNDPSPKGD","ProcessId":18156,"ProcessName":"UmbracoProject","ThreadId":12,"AppDomainId":1,"AppDomainAppId":"65ffeee9778a120d6cbdf3a5f87bfe043e30dcbe","MachineName":"LAPTOP-TVMJ2DRH","Log4NetLevel":"WARN ","HttpRequestId":"7e17b53a-6dde-4297-a8e9-4d0cece4ad09","HttpRequestNumber":11,"HttpSessionId":"49d01c4e-d49f-dad9-6483-4c83839e47ec"}
{"@t":"2021-10-25T13:30:49.7012205Z","@mt":"Could not find a value for configuration field '{ConfigField}'","@l":"Warning","ConfigField":"preview","SourceContext":"Umbraco.Cms.Core.Models.Mapping.DataTypeMapDefinition","ActionId":"2eef8bc2-65e5-48d6-bf31-a53eba71d4ab","ActionName":"Umbraco.Cms.Web.BackOffice.Controllers.DataTypeController.GetById (Umbraco.Web.BackOffice)","RequestId":"0HMCNNDPSPKGD:000001F5","RequestPath":"/umbraco/backoffice/umbracoapi/datatype/GetById","ConnectionId":"0HMCNNDPSPKGD","ProcessId":18156,"ProcessName":"UmbracoProject","ThreadId":12,"AppDomainId":1,"AppDomainAppId":"65ffeee9778a120d6cbdf3a5f87bfe043e30dcbe","MachineName":"LAPTOP-TVMJ2DRH","Log4NetLevel":"WARN ","HttpRequestId":"13dcb90c-5603-44ca-a730-0618ac399160","HttpRequestNumber":12,"HttpSessionId":"2533b21a-1e20-aea3-d5b8-233221d2da07"}
{"@t":"2021-10-25T13:30:56.2623489Z","@mt":"Could not find a value for configuration field '{ConfigField}'","@l":"Warning","ConfigField":"preview","SourceContext":"Umbraco.Cms.Core.Models.Mapping.DataTypeMapDefinition","ActionId":"2eef8bc2-65e5-48d6-bf31-a53eba71d4ab","ActionName":"Umbraco.Cms.Web.BackOffice.Controllers.DataTypeController.GetById (Umbraco.Web.BackOffice)","RequestId":"0HMCNNDPSPKGD:00000201","RequestPath":"/umbraco/backoffice/umbracoapi/datatype/GetById","ConnectionId":"0HMCNNDPSPKGD","ProcessId":18156,"ProcessName":"UmbracoProject","ThreadId":63,"AppDomainId":1,"AppDomainAppId":"65ffeee9778a120d6cbdf3a5f87bfe043e30dcbe","MachineName":"LAPTOP-TVMJ2DRH","Log4NetLevel":"WARN ","HttpRequestId":"80a0b019-7e87-4be9-a4fc-e9925c2d6866","HttpRequestNumber":13,"HttpSessionId":"d54e5a1f-eb82-473e-f91c-22da5191421f"}
{"@t":"2021-10-25T13:30:57.8133529Z","@mt":"Could not find a value for configuration field '{ConfigField}'","@l":"Warning","ConfigField":"preview","SourceContext":"Umbraco.Cms.Core.Models.Mapping.DataTypeMapDefinition","ActionId":"2eef8bc2-65e5-48d6-bf31-a53eba71d4ab","ActionName":"Umbraco.Cms.Web.BackOffice.Controllers.DataTypeController.GetById (Umbraco.Web.BackOffice)","RequestId":"0HMCNNDPSPKGD:00000205","RequestPath":"/umbraco/backoffice/umbracoapi/datatype/GetById","ConnectionId":"0HMCNNDPSPKGD","ProcessId":18156,"ProcessName":"UmbracoProject","ThreadId":55,"AppDomainId":1,"AppDomainAppId":"65ffeee9778a120d6cbdf3a5f87bfe043e30dcbe","MachineName":"LAPTOP-TVMJ2DRH","Log4NetLevel":"WARN ","HttpRequestId":"904af8b3-e83b-40ac-831d-09e074ebf18e","HttpRequestNumber":14,"HttpSessionId":"0c194f8a-5991-3d7f-4716-ad6c0b3489f7"}

Originally reported in Contentment repository here, but it may be an core issue when changing property editor of an existing datatype:
leekelleher/umbraco-contentment#176

However the log message Could not find a value for configuration field '{ConfigField}' isn't very useful. I think it was meant to log name of "ConfigField" ... not logging the value {ConfigField} 🙈

This line is logged here: https://github.com/umbraco/Umbraco-CMS/blob/v9/contrib/src/Umbraco.Core/Models/Mapping/DataTypeMapDefinition.cs#L179-L180

Specifics

No response

Steps to reproduce

Not sure there's is an easy way to reproduce. In my use-case I originally change property editor on an existing datatype from radiobutton list to [Contentment] Data List property editor and when models generation failed I noticed these log errors.

@leekelleher mentioned it may be a bug with cache not being refreshed when changing property editor of an existing datatype.

Expected result / actual result

No response

@bjarnef
Copy link
Contributor Author

bjarnef commented Oct 26, 2021

Actually I think it works as expected as it create a separate property "ConfigField" which in this case has the value "preview".

@bjarnef bjarnef closed this as completed Oct 26, 2021
@leekelleher
Copy link
Member

@bjarnef This is interesting, as the "preview" configuration value (of Contentment's Data List) doesn't hold a value - it's a read-only field. So by that logic, it would always log a warning.

https://github.com/umbraco/Umbraco-CMS/blob/release-9.0.1/src/Umbraco.Core/Models/Mapping/DataTypeMapDefinition.cs#L167-L181

That doesn't seem quite right - what's the purpose of the warning? Did something go wrong? (that's more a conceptual question) Are the built-in DataTypes immune to this - if so why? 🤔

@bjarnef
Copy link
Contributor Author

bjarnef commented Oct 26, 2021

@leekelleher yeah, I think there are use-cases like this, where you could have a config property, which doesn't store a view like this, but it seems to complain because the property exists while not holding any value.

I don't remember if prevalues in property editors used to have a readonly property .. other it would be useful if it ignore those config fields.

However not sure it is an issue (except pollution of the log files with these warnings) - at least not in v8.

@leekelleher
Copy link
Member

leekelleher commented Oct 26, 2021

@bjarnef The ConfigurationField doesn't have any options to state that it's read-only.

Like you say, I don't recall seeing (or hearing) about any errors/warnings related to this for Umbraco v8.x.
Scrap that, it was in v8.x: https://github.com/umbraco/Umbraco-CMS/blob/release-8.17.0/src/Umbraco.Web/Models/Mapping/DataTypeMapDefinition.cs#L163-L176

@leekelleher
Copy link
Member

@bjarnef I think we should re-open this issue, as should Umbraco be raising a warning if a DataType's prevalue doesn't have a value?

Is the suggestion that read-only prevalue editors shouldn't be used?

@bjarnef bjarnef reopened this Oct 26, 2021
@umbrabot
Copy link

Hiya @bjarnef,

Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more.

We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed).

To open it this issue up again, you can write @umbrabot still relevant in a new comment as the first line. It would be super helpful for us if on the next line you could let us know why you think it's still relevant.

For example:

@umbrabot still relevant
This bug can still be reproduced in version x.y.z

This will reopen the issue in the next few hours.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@umbrabot umbrabot added the status/stale Marked as stale due to inactivity label Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/stale Marked as stale due to inactivity type/bug
Projects
None yet
Development

No branches or pull requests

3 participants