backdrop-contrib / paragraphs_jquery_ui_accordion

An accordion display for paragraph title and description content on Backdrop CMS
https://backdropcms.org/project/paragraphs_jquery_ui_accordion
GNU General Public License v2.0
1 stars 4 forks source link

Paragraph Type with Entity Reference does not work #5

Closed yorkshire-pudding closed 2 years ago

yorkshire-pudding commented 2 years ago

Steps to reproduce

  1. Create a paragraph type with a text field for the title and an entity reference field that can reference one or more types of node
  2. Manage the display of paragraph entity reference field to be Rendered entity
  3. Enable that paragraph type in a content type
  4. Create content and add one or more of these paragraphs with a title and an entity
  5. First set the content type display for the field to "Paragraph items" and verify that the entity is rendered
  6. Next switch it to paragraphs jQuery Accordion and set the bundle type, the title and the content to point to the paragraph type, title field and entity reference field respectively.
  7. View the node

Results

Expected

Referenced entity is rendered within accordion content

Actual

content is not displayed. content includes just the title of the entity in plain text. (note - tested with display of Label with Link and entity id and it still just showed a plain text title in the accordion content.

Note

On content types where I have a direct entity reference field and use field group to add a containing accordion group and accordion item, then the referenced entity is rendered in the accordion content.

alanmels commented 2 years ago

Not sure how to start troubleshooting this as everything is working for me. See the Frequently Asked Questions section on https://www.homiebees.com/#faq which is build using Paragraphs and Paragraphs jQuery UI Accordion. Also the https://backdropcms.org/project/paragraphs_jquery_ui_accordion shows there are 32 active installs of the module, which means it's working for others too.

Please note that nothing is configured on the content type or node level, the magic takes place in the views, where you add two fields - one for questions and the other for answers - filtering the paragraphs of the certain node (nid = something). And then you need to set Formatter for the answers field to Paragraphs jQuery UI Accordion. It should look like below:

Screen Shot 2022-08-31 at 12 42 04 AM

I hope this helps you to get it working.

yorkshire-pudding commented 2 years ago

Hi @alanmels - thanks for getting back to me. I have no problems getting this module to work on other content types that include a simple content and title (in my other case, they are both HTML fields) which work fine.

The issue is when I try to include an entity reference field as "Paragraph content" - Have you had any success including an entity reference field as "paragraph content?

Perhaps this is a limitation, but I did think as the accordion in Field Groups can handle entity reference fields that it should be possible in this.

alanmels commented 2 years ago

Sorry for finding some time for replying to this just now. Unfortunately, I never had a need and so never tried this module with entity reference fields. Please note that the module was ported from Drupal with minimum necessary changes and has the same limitations inherited that Drupal version has. Unfortunately, I do not have time to make it work, but will welcome any PRs for new features.

yorkshire-pudding commented 1 year ago

This function is now available in https://github.com/backdrop-contrib/paragraphs_jquery_ui_accordion2