Skip to content

Conversation

@emanueljacob
Copy link
Contributor

Description

Fix preview mode when trying to preview a revision that contains a block that itself uses a blockable relation.

The fix is relatively simple: we just move the assignment of the models id to the new instance directly after creation but BEFORE hydration takes place. this way the hydration can make use of the models id and can set the blockable_id in the block relation

More information and detailed bug explanation including examples and references can be found in #2483

Related Issues

Fixes #2483
Related to #797

@ifox ifox merged commit 481afe8 into area17:3.x Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

blockable relation not available in module (revision) preview, caused by missing model id => missing blockable_id (in block relation)

2 participants