I am working on a page with multiple Smart Blocks placed inside paragraphs using Block (plugin) fields. When I edit one of the paragraphs with a Smart Block reference, collapse that paragraph (without making any changes) and save the page, all variations in the Smart Block are deleted.

CommentFileSizeAuthor
#4 3080170-4.patch4.38 KBmichaellander
#2 3080170-2.patch3.56 KBmichaellander
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

switzern created an issue. See original summary.

michaellander’s picture

Status: Active » Needs review
FileSize
3.56 KB

It looks like this was partially fixed before, but not for all scenarios, this should provide a fix for all scenarios.

switzern’s picture

Status: Needs review » Needs work

Thanks for the patch @michaellander.

Unfortunately I'm still seeing the issue, here are the steps you can follow to duplicate:

1. Use Composer to remove Smart Content from test site.
2. Use Composer to install current 1.x-dev release of Smart Content with the patch from #2 applied via Composer.
3. Clear cache on test site.
4. Go to a node that is placing a Smart Block using a Block (plugin) field on a Paragraph.
5. Click the edit button on that Paragraph, but do not make any changes to the content of the Smart Block.
6. Collapse the Paragraph and save the node.
7. Edit the same node and click the edit button on the same Paragraph and you should be able to confirm that all variation on the Smart Block that were previously there have been deleted.

I did confirm that the patch applied cleanly, but let me know if there is any other information I can provide to help with additional testing and duplication.

michaellander’s picture

Status: Needs work » Needs review
FileSize
4.38 KB
switzern’s picture

Status: Needs review » Reviewed & tested by the community

The updated patch applies cleanly to the current HEAD of the dev branch and fixes the issue outlined in the original description. To test, I followed the same steps I outlined in #3, but when I go back to the edit the node in step 7, all the of the content has been preserved and is available to edit. Marking as RTBC because I've tested in multiple different instances and everything is working as expected.

  • michaellander committed 8baac8e on 8.x-1.x
    Issue #3080170 by michaellander: Variations deleted when referencing...
michaellander’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.