Problem/Motivation

When the block is rendered in Gutenberg (and when the block settings are populated), the settings defined in the gutenberg markup isn't respected. If I have 4 newsletters, and choose to display 2 of them in the form; I see no options at all.

Steps to reproduce

  1. Enable simplenews and gutenberg
  2. Configure the content type to allow insertion of "Simplenews subscription" in the Gutenberg editor (under "Allowed Drupal blocks")
  3. Open the node add page for the content type
  4. Insert a simplenews block
  5. Click the cogwheel to display block settings
  6. Choose to display one or more newsletter options in the form
  7. Click the Update button

Proposed resolution

Fix the code so that the Gutenberg markup reflects the settings in the Gutenberg modal. The values are stored as 0/1 in Gutenberg, but needs to be converted to the machine names when used to render the markup or the bloc settings modal.

Issue fork simplenews-3257798

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

svenryen created an issue. See original summary.

adamps’s picture

This is similar to #3257762: Unique id is empty by default, causing issues with Gutenberg and I agree with the comment there from @Berdir. This block works fine without Gutenberg, and goes wrong with Gutenberg. It seems to me that the Gutenberg system is altering blocks from other modules making assumptions that are not necessarily true. So I would think the fix should be applied in Gutenberg.

adamps’s picture

Status: Active » Closed (won't fix)