[opencms-dev] Different behavior of the c Tag between version 17 and version 18 in OpenCMS

Ramon Gavira Sáenz ramon.gavira at sagasoluciones.com
Wed Nov 6 16:53:27 CET 2024


Hello.

Here's a simple example of the issue:

We have a resource with a formatter like this:

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:redirect url="https://www.google.com"/>

In version 17 or 16 and lower, if the resource is on a page, the redirect works as expected, I mean that performs the redirect. However, in version 18, this fails and returns the following error on the page:

Error parsing element /en-en/page/.elements/Banner_00001.xml. Please check if the HTML generated by the element formatter is well formed.

To test this, it’s recommended to first create the formatter without the redirect; otherwise, it won't allow you to drag it onto the page, whether it works or not.
This is just a sample to replicate the issue. In the actual case, this code is within a function that performs the redirect based on specific logic.

I have post an Issue on Github but, Anyone has an idea to workarround this?

Thanks



Ramón Gavira Sáenz









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20241106/b1cb6e10/attachment.htm>


More information about the opencms-dev mailing list