Problem/Motivation

When editing an existing block that has been updated to the latest schema after deploying the Beta 5 release, the JSON Editor form is loaded with a bundled schema, but when creating a new block with a pattern containing references, the bundled schema is not used and AJAX requests are still triggered. The unbundled schema is also compared against the bundled version which triggers a prompt for the user to update the schema even on a form creating a new block.

Steps to reproduce

  1. Install the patternkit, patternkit_example, and layout_builder modules
  2. Enable layout builder on a content type
  3. Edit the layout for this content type
  4. Add a new "[Patternkit] Example with Reference" block
  5. (X) Observe the prompt at the top of the form to update the pattern schema and template

Note: This only happens when creating new blocks for patterns containing references. If a pattern does not contain references, the bundled and unbundled schema are the same, so no prompt is displayed.

Proposed resolution

Ensure when loading a fresh version of the pattern for the block form, the bundled schema is loaded for use.

Remaining tasks

User interface changes

Editors should no longer be prompted to update a pattern when creating a new block.

API changes

None

Data model changes

None

Issue fork patternkit-3308892

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

slucero created an issue. See original summary.

slucero’s picture

Title: New Block Forms Don't Load Bundled Schemas » New Block Forms Prompt for Pattern Update

Renaming to something more symptom-specific for better recognition.

slucero’s picture

Status: Active » Needs review
StatusFileSize
new2.9 KB

I've uploaded and MR for review to fix this issue. I'm attaching a patch as well for easy access.

slucero’s picture

slucero’s picture

Status: Needs review » Reviewed & tested by the community

  • slucero committed 5136960 on 9.1.x
    Issue #3308892 by slucero, jordanpagewhite: New Block Forms Prompt for...
slucero’s picture

Status: Reviewed & tested by the community » Fixed

Merged for inclusion in the Beta 6 release.

Status: Fixed » Closed (fixed)

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