Discussion:
Custom renderer is not initialised
Gerton ten Ham (via Magnolia Forums)
2014-10-13 15:34:03 UTC
Permalink
Hi,

I have created a custom renderer extending the FreemarkerRenderer. I bootstrapped the configuration into my custom module like:

Modulename -> renderers -> renderername

After installation (fresh install) the configuration is loaded but apparently not correctly initialized. When i change in an existing component templatedefinition the renderType to my new renderer nothing happens, but an exception occurs in the background with root cause:

Caused by: java.lang.NullPointerException
at info.magnolia.rendering.engine.DefaultRenderingEngine.render(DefaultRenderingEngine.java:106)
at info.magnolia.rendering.engine.DefaultRenderingEngine.render(DefaultRenderingEngine.java:91)
at info.magnolia.rendering.engine.DefaultRenderingEngine.render(DefaultRenderingEngine.java:86)
at info.magnolia.rendering.engine.DefaultRenderingEngine$$EnhancerByCGLIB$$f77130d3.render(<generated>)
at info.magnolia.templating.elements.ComponentElement.begin(ComponentElement.java:181)
at info.magnolia.templating.freemarker.AbstractDirective.execute(AbstractDirective.java:92)
at freemarker.core.Environment.visit(Environment.java:274)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
at freemarker.core.Environment.visit(Environment.java:428)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.process(Environment.java:199)
at freemarker.template.Template.process(Template.java:237)
at info.magnolia.freemarker.FreemarkerHelper.render(FreemarkerHelper.java:153)
at info.magnolia.rendering.renderer.FreemarkerRenderer.onRender(FreemarkerRenderer.java:96)
at info.magnolia.rendering.renderer.AbstractRenderer.render(AbstractRenderer.java:151)
at info.magnolia.rendering.engine.DefaultRenderingEngine.render(DefaultRenderingEngine.java:106)
at info.magnolia.rendering.engine.DefaultRenderingEngine$$EnhancerByCGLIB$$f77130d3.render(<generated>)
at info.magnolia.templating.elements.AreaElement.end(AreaElement.java:325)
... 142 more

When i make a change into the configuration of the renderer or i move the renderers node using the configuration app it is loaded (probably node2bean kicking in) and the component renders correctly .

I am on Magnolia 5.3.3

Is this a known issue?

Regards,
Gerton ten Ham
--
Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=94674a09-c86f-499d-bb9c-e345b4debc4b


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-***@magnolia-cms.com>
----------------------------------------------------------------
Loading...