Empty Add paragraph dropdown in dialog

Created on 1 March 2023, over 1 year ago
Updated 4 July 2023, 12 months ago

Problem/Motivation

There is an empty "Add paragraph" dropdown in the dialog.

Steps to reproduce

  • D10.0.3
  • Paragraphs 8.x-1.15
  • Edit dialog of a layout paragraph

It also has this js error:

dialog.position.js?v=10.0.3:82 Uncaught TypeError: Cannot read properties of undefined (reading 'settings')

Proposed resolution

Probably just hide it because there are buttons below

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇧🇪Belgium stefvanlooveren

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

Comments & Activities

  • Issue created by @stefvanlooveren
  • Issue was unassigned.
  • Status changed to Postponed: needs info over 1 year ago
  • 🇩🇪Germany Anybody Porta Westfalica

    @stefvanlooveren any idea what might have caused this? Drupal 10 upgrade?
    Or might this be specific to your installation?

    Can you reproduce this via simplytest.me for example?

    Nobody else reported this yet.

  • 🇮🇪Ireland frankdesign

    I am seeing this issue too. This is a new build site I am working on. It appears to be an issue with Claro. This issues does not happen when using Seven as the admin theme. To reproduce the issue:

    Create a 'Layout Paragraph'
    Create a number of Paragraphs - e.g. a 'Text Paragraph' with a text field and an 'Image Paragraph' with an image field.
    Create another Paragraph which we'll call 'Nested Paragraph'. Add a Paragraph Reference Field that allows unlimited number of values. Allow the 'Text Paragraph' and 'Image Paragraph' to be referenced.
    In a Content Type, add a Paragraph field (which we'll call 'Content') and allow the 'Nested Paragraph' to be referenced. In the Form Display, choose Layout Paragraphs.

    Now add a new content, click on 'Add Section' in the 'Content' field, add which ever column option you want and click save. Now click on the plus icon to add a paragraph and choose 'Nested Paragraph'. In the ui-dialog that is displayed, there are no paragraph types listed in the dropdown form action, and instead, the 'Add Text Paragraph' and 'Add Image Paragraph' are listed as small buttons in the footer of the ui-dialog beside the Save and Cancel button.

    And if you have nested paragraphs with nested paragraphs inside that, each time you click on Add Nested Paragraph inside a nested paragraph, the Add Paragraph Buttons are duplicated in the ui-dialog footer.

    The above was created with Drupal 9.5.7, Layout Paragraphs 2.0.2 and Paragraphs 8.x-1.15.

    If you need more info, please let me know

    F

  • Status changed to Active 12 months ago
  • 🇺🇸United States DamienMcKenna NH, USA

    I'm also seeing this. The problem gets worse the more levels of nesting there are - the buttons from all of the "add paragraph" widgets are added to the bottom of the dialog, so it's unclear what would happen when one of the "add" buttons is clicked - where the new paragraph would go.

    It might be worth having an option to not move/replace the "add paragraph" UI elements, to reduce the amount of complexity and be able to make sure the basic functionality works as expected.

    Bumping this to "major" as it breaks the editorial UI in certain cases.

Production build 0.69.0 2024