Support default layouts and content for layout paragraphs

Created on 30 January 2021, almost 4 years ago
Updated 21 August 2024, 3 months ago

Problem/Motivation

Both the Paragraphs Classic and the Paragraphs EXPERIMENTAL widgets do implement an option that let the user to select a Default Paragraph Type that will be added in a new parent Hosting Entity once it is firs created (insert operation).

Proposed resolution

This feature request goal implements this same functionality in Layout Paragraphs widget too ...

Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇮🇹Italy itamair

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

Comments & Activities

Not all content is available!

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

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    55 pass
  • 🇬🇧United Kingdom fredcurl

    Hi all,

    I have a patch for the newer versions of layout paragraphs as we required a solution, works with the 1.0 hook as we were using before. It was something I put together to get it working. Hoping it might breathe some new life into this thread!

  • 🇳🇿New Zealand john pitcairn

    I wonder whether we should be dispatching events rather than alter hooks. Event subscribers are more flexible than alter hooks if you need to run before or after another module's implementation, more self-documenting, and more IDE-friendly.

  • 🇮🇪Ireland frankdesign

    Hi, tried patch at #31. Patch applied no problem but I still can't set a default layout paragraph. When I try to set one I get the error:

    Warning: array_flip(): Can only flip string and integer values, entry skipped in Drupal\Core\Entity\ContentEntityStorageBase->loadMultipleRevisions() (line 667 of core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php).

    Any ideas?

Production build 0.71.5 2024