Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's me..again ;)
This time, my edge-case is:
I have a parent Document (/aaa) with some contents inside it (/aaa/foo).
The parent have some text with an internal link to /aaa/foo that is stored in block data as a resolveuid string (correct).
Now, edit parent changing its id (from "aaa" to "bbb") and add some random text.
When you save the form, Volto sends to restapi the blocks with the link to foo like this: http://localhost:3000/aaa/foo.
restapi deserializer now try to resolve all links and convert them in resolveuid-like, but it is called after parent rename, so the path "/aaa/foo" is invalid and lead to store in the parent blocks a link like "http://localhost:3000/aaa/foo" that is potentially broken.
My pr add an additional check in path2uid method, to check also aliases for a given path.
📚 Documentation preview 📚: https://plonerestapi--1848.org.readthedocs.build/