hello
By now we have a whole bunch of magnolia websites, and we are changing stuff
all the time. We try to keep the data in sync with the changes in the
template/paragraph configuration, but, human as we are, we fale..
So, our production logs show quite a lot of:
info.magnolia.module.templating.RenderException: Can't find renderable
definition
A wonderful statement, but alas there is no reference to what particular
peace of content has been attempted to render, and so it is a bit unhelpful.
So, I created this trivial class to remedy the problem:
-----
package nl.vpro.magnolia.module.vprotemplatingkit.rendering;
import info.magnolia.cms.core.Content;
import info.magnolia.module.templating.RenderException;
import info.magnolia.module.templating.engine.DefaultRenderingEngine;
import java.io.Writer;
/**
* Created by IntelliJ IDEA.
* User: ernst
* Date: 2/14/11
* Time: 4:43 PM
* To change this template use File | Settings | File Templates.
*/
public class VerboseRenderingEngine extends DefaultRenderingEngine {
protected void render(Content content, String definitionName,
RenderingHelper helper, Writer out) throws RenderException {
try {
super.render(content, definitionName, helper, out);
} catch (RenderException e) {
throw new RenderException(e.getMessage() + " for content " +
content.getHandle(), e);
}
}
}
-----
And confgure the config/server/rendering/engine/class property with the
fully qualified name of this class.
Now we at least get to see what content fails to be rendered, and we can fix
it.
But perhaps it would be nice to change DefaultRenderingEngine to log this
info.
regards,
--
Ernst Bunders
Ontwikkelaar VPRO
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------