Update existing library entries

Created on 14 August 2021, over 3 years ago
Updated 10 August 2023, over 1 year ago

Problem/Motivation

Right now, it is not possible to udpate an existing library item with an updated variant of a section. You need to delete the "old" section entry and resave the new one.

Proposed resolution

Provide a "create or update" checkbox in the "add section" form.

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇩🇪Germany Christian.wiedemann

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    Waiting for branch to pass
  • 🇩🇪Germany iuscare

    Hi there,

    there is a small bug in the latest patch, where we cannot get sections, because we are also fetching the templates here when trying to access the saved sections. This patche fixes this issue.

  • 🇺🇸United States segovia94

    It would be good to have the update checkbox behind a permission to prevent templates from being overridden by restricted users.

  • 🇳🇬Nigeria chike Nigeria

    None of the patches is applying on the latest version.

  • 🇮🇳India akshay_d Bangalore

    Hi all,

    I am able to get #16 patch working and able to replace the existing template/sections with new one and reuse the new one across the site.

    Drupal Version : 10.2.6

    Thanks

  • First commit to issue fork.
  • Pipeline finished with Success
    3 months ago
    Total: 142s
    #397292
  • 🇺🇸United States jastraat

    I love this idea but new features are only being added in the 2.x branch and that branch has changed enormously since this MR was opened. If I get time, I'm going to try creating a new branch/MR based on your work that is compatible with the current 2.x branch. (I already started working on this; there are additional considerations since we only want folks to be able to update templates they have access to edit, sections and templates are now using content entity forms/fields and those two types were merged into the same add form to reduce duplication.

  • 🇺🇸United States jastraat

    Unfortunately since templates can have additional unknown fields, this approach may be really confusing for editors unless there was some additional magic to have editors first pick whether or not they were creating a new template or updating an old and then as a 2nd step if updating, populate the entity form with the existing section template field values. I'm just not sure how feasible this approach is when there could be additional custom fields on the entity.

  • 🇺🇸United States jastraat
Production build 0.71.5 2024