[MAGNOLIA-6055] NullPointerException thrown to PageEditor when class configured for contextAttribute is not available Created: 29/Jan/15 Updated: 13/Feb/15 Resolved: 04/Feb/15 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | rendering |
| Affects Version/s: | 5.4 |
| Fix Version/s: | 5.4 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Philip Mundt |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | quickwin | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
This could happen to a user if for example they install a module which installs a contextAttribute in the configuration @ /modules/rendering/renderers/freemarker/contextAttributes And then the user removes the module from the project. Expected Fix: Please see branch on MAIN: ' |
| Comments |
| Comment by Christopher Zimmermann [ 29/Jan/15 ] |
|
If "entry.getValue().getComponentClass()" is null, log error and do not try to add it as a context attribute. |
| Comment by Magnolia International [ 03/Feb/15 ] |
|
While I agree to not try and add the component into the context if null, the rest of this patch should IMO be reverted:
ERROR info.magnolia.jcr.node2bean.impl.Node2BeanTransformerImpl 03.02.2015 15:09:40 -- Can't set property [componentClass] to value [foo.info.magnolia.templating.functions.TemplatingFunctions] in bean [info.magnolia.rendering.renderer.ContextAttributeConfiguration] for node /modules/rendering/renderers/freemarker/contextAttributes/cmsfn due to org.apache.commons.beanutils.ConversionException: Default conversion to Class failed. |