Condition dependend paragraphs visibility causes form buttons text to disapear

Created on 7 March 2019, over 5 years ago
Updated 4 March 2024, 9 months ago

Problem/Motivation

When using conditional fields with Entity Reference Revision fields that reference Paragraphs. If the paragraphs have buttons, the buttons lose their "value" property when hidden by conditional fields conditions.

Steps to reproduce:
1. Create a content type.
2. Enable the Entity Reference Revision module: https://www.drupal.org/project/entity_reference_revisions
3. Add/Create an Entity Reference Revision field and set it to Required. Also, (in my case) set it to allow only 1 value on Field Settings. Have it also only allow on paragraph type.
4. Create a conditional dependency on something like the node title being populated which then makes the referenced paragraph visible.
5. On the content type's "Mange Form Display" settings configure the Entity Reference Revision field form step 3 to a "Default paragraph type" of the type you selected in step 3 (should already be set).
6. Create a new node of that content type and activate the condition.
7. The paragraph buttons lose their value. (You need a paragraph with buttons, obviously).

Proposed resolution

Apparently, the use of .trigger() function causes bubbling which affects the paragraph content. Switching to .triggerHandler() seems to fix this but, needs to be tested.

🐛 Bug report
Status

Closed: works as designed

Version

4.0

Component

Javascript

Created by

🇺🇸United States ejanus

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.

  • 🇮🇳India saurabh-2k17

    Are we still experiencing this with the 4.x?

  • Status changed to Closed: cannot reproduce 9 months ago
  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Patch in #2 and #13 hold small changes while #12 after the question for a reroll has a massive amount of changes in. Apart from that I tried to reproduce the issue but it was hard to follow the somewhat misleading steps and to make sure it is the same setup. I do not see buttons apart from edit or collapse buttons but I do not even know which buttons and its value this issue refers to.

  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin
  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Before adding tags read the issue tag guidelines . Do NOT use tags for adding random keywords or duplicating any other fields. Separate terms with a comma, not a space.

  • Status changed to Closed: works as designed 9 months ago
  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

    This whole issue, its report, the comments below and the different patches, is all very confusing!

    To support the issue I have tried to reproduce this issue once again(!) Especially because this issue is listed as beta-blocker. But seriously, I don't know why...

    ... and still do not get the reproduction steps done with the error like described. At first I thought: What does the "paragraphs buttons" refer to in the issue summary? From my understanding buttons only occur when you have set the reference to allow multiple values and create a paragraph. But it says: set up limited to one. Okay ... Also the phrasing that they loose their "values" confused me. What "values" can a button hold? Then I looked at the one screenshot again and realized that the report refers to the button "text". Then the comments later do not refer to the paragraph its buttons no more, but suddenly to all buttons. Which makes more sense. And also visible in the screenshot. It took me an hour to finally get what this issue wants to be about.

    And then the previous last monster patch addressing a patch issue with another issue at #12... And then the patch after, small again, stating to update the patch for alpha6?... We are on alpha5 atm. There is no 6...

    Okay but apart from that: please view my reproduction screen-cast upload and you will see the most constructive comment and question in here was actually #14: "Are we still experiencing this with the 4.x?" Exactly. I am pretty sure the answer is:

    No.

Production build 0.71.5 2024