Problem/Motivation

#3246699: Add "Save and Edit Layout" button to entity edit pages introduced the Save and edit layout button on create and edit entity forms. Unfortunately the if-condition that checks for an instance of ContentEntityFormInterface results in the button being added to any entity form implementing that interface (except the delete form of course)

Steps to reproduce

  • Install layout_builder_save_and_edit module
  • Build a custom entity form class that implements ContentEntityFormInterface or extends ContentEntityForm class for an entity type/bundle that has layout builder with overrides enabled
  • Create a route that displays that form -> see the Save and edit layout button being added

Proposed resolution

Remaining tasks

  • Create a patch/MR that fixes this issue

User interface changes

  • Save and edit layout button will only be added to relevant forms anymore

API changes

n/a

Data model changes

n/a

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

hctom created an issue. See original summary.

hctom’s picture

Issue summary: View changes

hctom’s picture

Status: Active » Needs review

Please see the issue fork and MR for a proposal to fix this issue.

jastraat’s picture

Status: Needs review » Reviewed & tested by the community

This fixed our issue where the save and edit layout button was appearing in the forms for scheduled_transitions. Simple change that only adds the button where it makes sense.

jastraat’s picture

Could a maintainer please look at this? I'm disappointed a new release was made without getting this merged.

neslee canil pinto made their first commit to this issue’s fork.

neslee canil pinto’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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