Re: Different behavior of the c Tag between version 17 and version 18 in OpenCMS

Ramon Gavira Sáenz via opencms-dev <[email protected]> Tue, 12 Nov 2024 18:04:52 +0000
Newsgroups gmane.comp.cms.opencms.devel
Message-ID <AM6PR05MB52706C9C4780600E3D4D3775E2592@AM6PR05MB5270.eurprd05.prod.outlook.com>
Hi people,

Does anyone know or can think of an alternative to bypass this error? Or any hints on where to look?
We're a bit lost, and a large part of our development depends on a method like this.


Thanks!!
________________________________
De: opencms-dev <[email protected]> en nombre de Ramon Gavira Sáenz via opencms-dev <[email protected]>
Enviado: miércoles, 6 de noviembre de 2024 16:53
Para: Lista correo OpenCms <[email protected]>
Cc: Ramon Gavira Sáenz <[email protected]>
Asunto: [opencms-dev] Different behavior of the c Tag between version 17 and version 18 in OpenCMS

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

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
https://lists.opencms.org/mailman/listinfo/opencms-dev