- Issue created by @dylan donkersgoed
- Merge request !9Added overridden block dependency subscriber to handle checking revision IDs... โ (Open) created by dylan donkersgoed
- last update
8 months ago 40 pass - ๐จ๐ฆCanada dylan donkersgoed London, Ontario
I've opened an MR. Also attaching a patch file.
- Status changed to Needs review
8 months ago 4:01pm 17 April 2024 - last update
8 months ago 40 pass Sometimes I get the same error when I add some media and the patch #3 has not worked for me.
- ๐จ๐ฆCanada dylan donkersgoed London, Ontario
@fruizalejos
We encountered further issues with this where sometimes access checks would check the default revision and the default revision wouldn't be referenced in any translation. I'm not sure how/why this happens, but it's possible you've run into the same issue. I worked around it by further expanding the check in a custom module to include the revision ID of the default revision when evaluating access. I didn't add it to the patch because I don't think we addressed the root cause and I'm not sure it's secure in all situations. It technically means someone might be granted edit access to a block revision that they otherwise wouldn't be able to edit.
In our case we have followed the following steps to reproduce it.
- Create an inline block and add a media in it, and save the block and the node.
- Then if you edit the inline block, you can continue adding media without any problem.
- The problem comes when you go to a node translation and change something in it. When you save it updates the id of the revision of the block, but it does not update it inside the section.
- So now, if you try to add the media in the original node, it doesn't work because the block revision id doesn't match the revision ids that are available inside the section.
- First commit to issue fork.
- Merge request !11Added overridden block dependency subscriber to handle checking revision IDs... โ (Open) created by brayn7
- last update
7 months ago 39 pass, 2 fail @brayn7
Do you use any additional core patches for layout_builder?- last update
7 months ago 39 pass, 2 fail - last update
7 months ago Composer error. Unable to continue. Last MR works with core patch ( https://www.drupal.org/project/drupal/issues/3047022#comment-15487162 ๐ Layout builder fails to assign inline block access dependencies for the overrides section storage on entities with pending revisions Needs work ), and update the sections blocks revision ids if any revision id has been generated in any translation.
- ๐ฎ๐ณIndia Binoli Lalani Gujarat
binoli lalani โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia Binoli Lalani Gujarat
Hello,
I was facing the same issue after applying the patch as per https://www.drupal.org/project/layout_builder_st/issues/3441591#comment-... ๐ "Non-reusable blocks must set an access dependency for access control." Needs review comment so I committed the code in 11 MR. Please review.
Thank you!
- ๐ต๐ญPhilippines bryanmanalo
Also experienced the same issue. I used the MR here in this issue. And the MR here https://www.drupal.org/project/drupal/issues/3047022#comment-15487162 ๐ Layout builder fails to assign inline block access dependencies for the overrides section storage on entities with pending revisions Needs work as per #13 and #11.
2 patches in total.
Thanks for the guidance!