Not working with UI Patterns

Created on 18 April 2022, over 2 years ago
Updated 27 April 2023, over 1 year ago

Problem/Motivation

Layout Paragraphs don't seem to work with Paragraphs that are using UI Patterns. Not sure if there's a way to configure it or set it up to do so, or if it just hasn't been considered yet.

Thanks so much

πŸ’¬ Support request
Status

Postponed: needs info

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mythaphel

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.

  • πŸ‡¬πŸ‡§United Kingdom nigelwhite Marsden

    I'd like to add some detail in case someone with more Drupal skills than me can make something of the symptoms

    Steps to reproduce........

    1. create a ui_pattern eg Modal
    2. test that it works by creating a content type 'Test Modal'
      1. add the fields to the content type
      2. set the layout for the content type as Modal
      3. create a node of type Test Modal
      4. save. It displays the modal button and clicking it opens the modal message
    3. Crate a paragraph type and create the fields
    4. because we have ui_patterns_layouts module, in manage display we can select the layout 'Modal'
    5. in a different content type (eg Test) add an 'entity reference revisions' field
    6. call it 'components' or some such
    7. edit the field and allow Modal to be used in this content type
    8. select Layout Paragraphs widget in Form Display and Manage Display
    9. at last we can create a node of type Test
    10. add a Section and pick a layout
    11. inside the section, add a Modal
    12. we get the Modal form asking us to enter data in the fields
    13. save
    14. the modal is now showing in the text editor window
    15. save the node
    16. modal is gone. It's not in the DOM at all.

    According to this documentation β†’ the two should work together

  • πŸ‡ΊπŸ‡ΈUnited States andrewmriv Southern California

    I am able to use UI Patterns with Layout Paragraphs.

    Do UI patterns work outside of Layout Paragraphs?
    If you make another content type with regular entity reference fields do UI Patterns work?

  • Status changed to Closed: cannot reproduce over 1 year ago
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • πŸ‡¬πŸ‡§United Kingdom nigelwhite Marsden

    Thank you for looking into it @andrewmriv. I'm glad it works for you - so maybe there's something funny in my environment that stops it working....... that is kinda hopeful.......

    In response to your questions - yes ui_patterns outside of layout_paragraphs does work. Please see no. 2 in 'steps to reproduce'

    To test the ui_pattern in isolation from layout_paragraphs........

    test that it works by creating a content type 'Test Modal'
    add the fields to the content type
    set the layout for the content type as Modal
    create a node of type Test Modal
    save. It displays the modal button and clicking it opens the modal message.
    Pass

    still puzzling

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • Status changed to Postponed: needs info over 1 year ago
  • πŸ‡¬πŸ‡§United Kingdom nigelwhite Marsden

    We still can't get a ui_pattern to save inside a layout_paragraphs container. Data can be entered in the pattern's fields but on Save the pattern vanishes. Go back into Edit and the pattern is gone.
    Vanilla Drupal 9.5.8. The only modules present are ui_patterns, ds and layout_paragraphs + it's dependencies. ui_patterns and layout_paragraphs are both working on their own.
    Error in logs
    [error] 1895#1895: *871 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception Twig\Error\LoaderError: "Template "modules/contrib/ui_patterns/templates/pattern-simpletext.html.twig" is not defined." at /var/www/html/web/modules/contrib/ds/templates/ds-entity-view.html.twig line 10" while reading response header from upstream, client: 172.24.0.6, server: , request: "POST /layout-paragraphs-builder/c141b322eb57d784c43020d991520c5a/choose-component?parent_uuid=c750c7c6-930f-4cbf-ac3a-830da4c3143e&region=first&_wrapper_format=drupal_dialog&ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "d9-vanilla.ddev.site:89", referrer: "http://d9-vanilla.ddev.site:89/node/add/section_paragraph_ui_pattern"

Production build 0.71.5 2024