Hi,
we are having an issue with empty table cells after using the "merge" and "split" function of the CMS_INPUT_DOMTABLE (or basically also when leaving one cell empty).
CMS Template:
Merge 2 cells into 1 by using the "Merge cells" function
Split one cell back into 2 cells (notice one of them is empty)
Result how it looks like in the FirstSpirit SiteArchitect
As for the front end part I just passed the payload with st_table to my custom component and do the iteration myself because FSXARichText does include empty
elements where I don't want them.
Below the example code which is not really needed because the error does happen within CaaSMapper before it reaches the front end.
The example code does not resemble what is finally being used in the application because I removed additional functions and styling.
We can reproduce this error as well. It seems the CaaS-Mapper is creating for empty table cells, that the sax parser, that is used under the hood, can't handle (it needs real XML entities) and throws an error. But we get the right structure to the frontend to display the table.
I agree, this behavior looks like a bug in the CaaSMapper. We created an internal ticket for this issue and will handle it. Any update on our internal Ticket will be synchronized here. Thank you @samo4b for your for the reproduction, that helped a lot 👍
Hi, we are having an issue with empty table cells after using the "merge" and "split" function of the CMS_INPUT_DOMTABLE (or basically also when leaving one cell empty). CMS Template:
When we access the page in the FSXA-PWA application on the front end we get this error:
I think the CaaSMapper cannot handle
Steps to reproduce:
Merge 2 cells into 1 by using the "Merge cells" function![image](https://user-images.githubusercontent.com/49033570/189920979-bbd0e5c9-12c9-4215-b419-9c45618ed9f2.png)
Split one cell back into 2 cells (notice one of them is empty)![image](https://user-images.githubusercontent.com/49033570/189921295-3c277086-9e4a-4f2b-8f50-c7da47e52866.png)
Result how it looks like in the FirstSpirit SiteArchitect![image](https://user-images.githubusercontent.com/49033570/189921401-e8ffa579-9405-48bf-b785-f1392429c393.png)
As for the front end part I just passed the payload with st_table to my custom component and do the iteration myself because FSXARichText does include empty
Can you check if you can reproduce and fix the issue?
We can reproduce this error as well. It seems the CaaS-Mapper is creating
for empty table cells, that the sax parser, that is used under the hood, can't handle (it needs real XML entities) and throws an error. But we get the right structure to the frontend to display the table.@samo4b Maybe this is the error, that your frontend is not rendering: https://github.com/e-Spirit/fsxa-api/issues/129 ;-)
I agree, this behavior looks like a bug in the CaaSMapper. We created an internal ticket for this issue and will handle it. Any update on our internal Ticket will be synchronized here. Thank you @samo4b for your for the reproduction, that helped a lot 👍
I created a PR: https://github.com/e-Spirit/fsxa-api/pull/130
PR #130 has been released. @samo4b it should fix your problem. Don't forget to update also the other fsxa dependencies accordingly.