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.

  1. Create a new content and Save
  2. Edit the Layout
  3. Add a view block that has Use AJAX set to TRUE and Save the Layout
  4. 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

oheller created an issue. See original summary.

gun_dose’s picture

I have the same issue. Any thoughts on this?

dco’s picture

Same 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.

nord102’s picture

Issue summary: View changes

Added Steps to Reproduce to the Issue Summary

dco’s picture

I also have a block view with ajax enabled...
When removing this one the builder works just fine.

petr illek’s picture

I'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.

gun_dose’s picture

In 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.

tim.plunkett’s picture

So 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!

jidrone’s picture

I have the same issue, with a contact form in the page.

jidrone’s picture

Maybe another useful info, steps I followed to deal with it:

  1. Remove the contact form.
  2. Reload the page without saving.
  3. Make the needed changes and save.
  4. Edit the layout again and add the contact form in place again.
andy_used’s picture

Any updates on this?

bnjmnm’s picture

Status: Active » Closed (duplicate)