I'm updating my site from 8.6.16 up to 8.7.1. The layout builder is working fine in 8.6.16. After updating to Drupal 8.7.1, the behavior is sporadic but leads to not being able to save the layout with the message "You have unsaved changes." Also the Discard Changes and Revert to Default buttons reload the page with no change.
Sometimes I can open a piece of content to edit it and it works. Sometimes I immediately run into the issue. I was testing it with a new piece of content. I was able to insert a number of different blocks into it, saving it a couple of times (about 5) then it started not saving. I removed the blocks that I added and attempted to save. I get the same message without it updating. After I remove some blocks I'm able to save again. But the removed blocks do not have to be the same blocks I added to freeze it. Ex I add blocks A-F, then it freezes. It may unfreeze when I remove blocks E & F, or it may unfreeze when I remove B & D. And all the block types are different. I have a field, paragraph, embeded form, embeded video, view with context, custom blocks.
There are no errors either via ajax or in the db log.
I'm using locally lightning and content_moderation with Vagrant/Ansible (drupalvm) and Acquia BLT on an MacOS High Sierra (10.13.6), php 7.1.23. I've also included the patch "Allow block plugins to determine if they are being previewed": "https://www.drupal.org/files/issues/2019-02-27/3027653-preview-10.patch."
Steps to Reproduce
As a pre-note to this, this behaviour seems to be consistent when having a view block that has Use AJAX set to TRUE in the Layout.
- Create a new content and Save
- Edit the Layout
- Add a view block that has Use AJAX set to
TRUEand Save the Layout - Attempt to Edit the Layout again (attempt to move, add, or remove blocks) and Save the Layout
The following results will occur:
- The Layout will not save and display "You have unsaved changes."
- "Discard Changes" and "Revert to Default" buttons will result in no change to the Layout
Comments
Comment #2
gun_dose commentedI have the same issue. Any thoughts on this?
Comment #3
dco commentedSame here, could not save, revert nor reset to default. When editing or creating a node.
Trying to switch to Bartik without success.
Drupal 8.7.1 with Bootstrap SASS sub theme and the above patch #1 is not used.
Comment #4
nord102Added Steps to Reproduce to the Issue Summary
Comment #5
dco commentedI also have a block view with ajax enabled...
When removing this one the builder works just fine.
Comment #6
petr illekI've same issues. Placing two facets blocks and a view with Ajax enabled.
When I initialy add them all is fine, but when going back and try to change their config (not showing block label) it got stuck.
Thanks @oheller for the tip with removing the blocks. That help me to make it work again.
Comment #7
gun_dose commentedIn my case there was views block with exposed filter. I removed filter from view and all works fine. I suppose, there is a problem with nested forms in layout preview, so this problem is enough serious, because it may be impossible to place some blocks, that contains forms.
Comment #8
tim.plunkettSo I think this issue is probably a dupe of #3045171: Form blocks rendered inside layout builder break save and #3042190: Creating a block that uses Ajax adds multiple blocks
But I'm going to leave it open until we're sure.
I'm sorry you are all hitting these bugs, but I appreciate the helpful information! Keep it coming!
Comment #9
tim.plunkettComment #10
jidrone commentedI have the same issue, with a contact form in the page.
Comment #11
jidrone commentedMaybe another useful info, steps I followed to deal with it:
Comment #12
andy_used commentedAny updates on this?
Comment #13
bnjmnmDuplicate of #3045171: Form blocks rendered inside layout builder break save