[CFGUI-114] Add DEBUG to #validateDefinition() in case of exceptions Created: 11/Mar/20 Updated: 18/May/23 Resolved: 08/Mar/21 |
|
| Status: | Closed |
| Project: | Definitions App |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Richard Gange | Assignee: | Richard Gange |
| Resolution: | Obsolete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Template: |
|
||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||
| Description |
|
We've had a few instances where the Definitions app --> Problems subApp does not open. What seems to happen is a definition can be broken in an unexpected way and very little information is provided. We have been finding new types of broken configuration since the app was released. 2019-06-18 09:23:15,363 ERROR agnolia.ui.framework.app.AppInstanceControllerImpl: Sub-app problems failed to start: null java.lang.NullPointerException: null at info.magnolia.rendering.template.registry.validator.TemplateDefinitionValidator.validateDefinition(TemplateDefinitionValidator.java:91) ~[magnolia-rendering-5.7.3.jar:?] at info.magnolia.pages.rendering.registry.validator.DialogAwareTemplateDefinitionValidator.validateDefinition(DialogAwareTemplateDefinitionValidator.java:71) ~[magnolia-pages-app-5.7.1.jar:?] at info.magnolia.rendering.template.registry.validator.TemplateDefinitionValidator.validate(TemplateDefinitionValidator.java:80) ~[magnolia-rendering-5.7.3.jar:?] at info.magnolia.config.registry.AbstractRegistry$1.lambda$getProblems$0(AbstractRegistry.java:241) ~[magnolia-configuration-5.7.3.jar:?] at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] It would be super helpful for support if we could get a DEBUG line in there to find the problem template quickly. protected void validateDefinition(Collection<DefinitionProvider.Problem> problems, DefinitionProvider<TemplateDefinition> definitionProvider) { TemplateDefinition definition = definitionProvider.get(); log.debug("Validating definition: {}", definition.getId()); String renderType = definition.getRenderType(); validateRenderType(problems, "", renderType); validateTemplateScript(problems, "", definition.getTemplateScript(), renderType); validateModelClass(problems, "", definition.getModelClass()); definition.getAreas().forEach((areaName, area) -> validateArea(definitionProvider, problems, "", area)); } |
| Comments |
| Comment by Richard Gange [ 08/Mar/21 ] |
|
It hasn't happened in a while. |