Fix Schema Layout Paragraphs type presave

Created on 28 June 2024, 2 months ago
Updated 14 July 2024, about 2 months ago

Problem/Motivation

After Installing the schemadotorg_layout_paragraphs module the newly created Layout paragraph, the paragraph of type layout that has the layout paragraph setting enabled, cannot have its layouts changed.
There is a schemadotorg_layout_paragraphs_paragraphs_type_presave hook that runs after every edit and save of that paragraph type, reverting the changes to what is setup in the config file: schemadotorg_layout_paragraphs.settings.yml.
So that any changes to the layouts listed there are reverted to the set when the module is installed.

Steps to reproduce

  • Install schemadotorg_layout_paragraphs
  • make sure the new paragraph called 'Layout' is installed
  • Try to edit the enabled layouts for the paragraph (remove one of them)
  • save the edited paragraph type
  • go back to edit the paragraph and see that the enabled layouts are the same

Proposed resolution

Change the schemadotorg_layout_paragraphs_paragraphs_type_presave hook to a create hook, and edit the associated SchemaDotOrgLayoutParagraphsManager presave method to a create method.

Apply the patch supplied with this issue to fix the problem.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States devanbicher

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024