backdrop-contrib / paragraphs

Paragraphs module to control your content flow
https://backdropcms.org/project/paragraphs
GNU General Public License v2.0
5 stars 11 forks source link

Paragraph 1.2.0-beta1 not compatible with Paragraphs jQuery UI Accordion #127

Closed bdalomgir closed 1 year ago

bdalomgir commented 2 years ago

After updating the paragraphs 1.x-1.1.0 to 1.x-1.2.0-beta1 version it affects the paragraphs jQuery UI Accordion module. As a result, it breaks all the accordion designs.

laryn commented 2 years ago

Did you update all modules (eg. Entity plus) and clear caches? Can you provide more info on how it breaks? I am using that module without a problem in a few places I think.

bdalomgir commented 2 years ago

@laryn Thanks for your reply. Yes, we updated all modules and cleared caches. Before upgrading the paragraph module it addressed all required accordion classes to the markup please see the screenshot below Screenshot from 2022-03-09 12-52-05 png (1906×577) (1)

But after upgrading it does not include any accordion related classes to the markup. Screenshot below for reference - Screenshot from 2022-03-09 12-53-15 png (1919×800)

laryn commented 2 years ago

Do you have a customized template file in your theme for accordion paragraphs? If so that might need slight tweaking.

argiepiano commented 2 years ago

I have done some testing with Paragraphs 1.x-1.2.0-beta1 and Paragraphs jQuery UI Accordion 1.x-1.0.1 and I can't reproduce this issue. The elements have the right classes, and the accordion seems to be working. Backdrop 1.21.3 and PHP 7.3.29.

Like @laryn, I also suspect that this issue may be the result of a customized paragraphs-item or node template file.

Screen Shot 2022-03-09 at 9 58 10 PM
bdalomgir commented 2 years ago

Thanks @laryn and @argiepiano for your reply. I have debugged again and found that normal accordion in paragraph working just fine. But we had a different case. We created an accordion using a title and description (which is another paragraph referenced). In this case its not working. Please check the screenshot below what we did - Accordion-with-reference-paragraph paragraph-config-page

argiepiano commented 2 years ago

When you say "not working" what exactly do you mean? Please provide more information about the issue.

bdalomgir commented 2 years ago

@argiepiano Not workings means Its not getting any accordion class i.e. jquery-ui-accordion. So total accordion functionality broke.

argiepiano commented 2 years ago

Does it work if instead of a Paragraph field for description you use a text field?

argiepiano commented 2 years ago

Also, which field has the accordion? Description? Or the field that points to the "Mosaic accordion" paragraph type? Also, what type of paragraphs is Description pointing to?

In other words, the more information you can provide, the better. It's hard to help without knowing all the details

laryn commented 2 years ago

@bdalomgir Is this still an issue in the latest version, or should we close it?

bdalomgir commented 1 year ago

@laryn Thanks so much for your reply. I have experimented with the new version of the Paragraph module on different machines/Environments and found the same problem. You can reproduce the problem by following the steps.

Steps are:

  1. Create a paragraph type called Accordion one with two field
    • Accordion Title
    • Accordion body
  2. Create another paragraph type called Accordion two with another two field
    • Title
    • Body
  3. You can edit any content type, go to the manage fields(/admin/structure/types/manage/page/fields), and create two-paragraph reference fields.
    • Accordion one refers to the Accordion one(paragraph type)
    • Accordion two refers to the Accordion two(paragraph type)
  4. Then go to the manage display(/admin/structure/types/manage/accordion/display/default) and make these two field Format as Paragraphs jQuery UI Accordion and configured these fields.
  5. Create content(/node/add/page) and add some accordion in Accordion one and Accordion two fields.
  6. Now you can see the Accordion one is working perfectly and Accordion two is not.
bdalomgir commented 1 year ago

@laryn I have been debugging this issue for a while now and figured out that the problem I mentioned in my last comment is not related to this issue rather it's a Paragraphs jQuery UI Accordion issue. I found they use an attribute ID for each paragraph accordion and the id is the entity ID (nid) where the accordion is placed. I checked changing the ID to different text and both the accordion were working. We can close this issue. I might create another issue under paragraphs jquery UI accordion. Thanks

New issue: https://github.com/backdrop-contrib/paragraphs_jquery_ui_accordion/issues/7