You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version 16, if the resource is on a page, the redirect works as expected. 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.
The text was updated successfully, but these errors were encountered:
rgaviras
changed the title
Different behavior of the c Tag between version 16 and version 18 in OpenCMS
Different behavior of the c Tag between version 17 and version 18 in OpenCMS
Nov 6, 2024
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.
Hello, Problem:
I have debugged the code from the TAG Builds_18_0 and I believe the issue is in the method org.opencms.loader.CmsJspLoader#dispatchJsp, specifically in the last else if (line 1109):
In the case where the JSP is a dynamic function, the method controller.isTop() always returns false, which means the redirection is never performed even if it exists, and null is returned, causing the error.
I am not sure why controller.isTop() always returns false.
Patch:
To trigger the redirection, I modified the code so that if we have RedirectInfo and the redirection contains "http", it performs the redirection without checking controller.isTop():
If this condition is not met, the original check is performed as before.
I don't believe this is the proper solution, but rather a temporary patch to address this issue.
I hope this information helps in resolving the problem.
Here's a simple example of the issue:
We have a resource with a formatter like this:
In version 16, if the resource is on a page, the redirect works as expected. 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.
The text was updated successfully, but these errors were encountered: