Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links in tables are not transformed to and from resolveuid #1590

Closed
pbauer opened this issue Feb 21, 2023 · 3 comments · Fixed by #1589
Closed

Links in tables are not transformed to and from resolveuid #1590

pbauer opened this issue Feb 21, 2023 · 3 comments · Fixed by #1589

Comments

@pbauer
Copy link
Sponsor Member

pbauer commented Feb 21, 2023

Links in tables in Volto do not use resolveuid.
When creating a link a full url is stored (which will break when deploying since the full url includes the domain).
When rendering a (e.g. imported or manually created) link that uses resolveuid it is not transformed to a path and is also broken.

Especially annoying: When migrating text in tables from classic to volto the links are correctly migrated to use resolveuid but since the transforms are not applied these links are all broken.

To Reproduce
Steps to reproduce the behavior:

  1. Create a table block with a link and a stale-block with a link
  2. Inspect the raw block and see that the link in the text uses "data": {"url": "../../resolveuid/39e4910bd5404b00a0e58bb55cc90c5c"} whereas the link in the table uses "data": {"url": "http://localhost:3000/ziel"}

Expected behavior
Both should use resolveuid.

Software:

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Volto 16.12.0-dev (current master)
  • Plone 6.0.1
  • Plone REST API Version 8.33.3
@pbauer pbauer changed the title Links in tables are not transformed Links in tables are not transformed to and from resolveuid Feb 21, 2023
@erral
Copy link
Sponsor Member

erral commented Feb 22, 2023

We had to explicitly add a new slateTable BlockSerializer to have this working in a recent project.

I will add the PR with the changes.

@erral
Copy link
Sponsor Member

erral commented Feb 22, 2023

This issue should be transferred to plone.restapi.

@pbauer pbauer transferred this issue from plone/volto Feb 22, 2023
@pbauer
Copy link
Sponsor Member Author

pbauer commented Feb 22, 2023

@erral Thanks a lot, I tested your branch and it works fine now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants