Closed (fixed)
Project:
Paragraphs
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2015 at 12:26 UTC
Updated:
7 Nov 2018 at 16:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rv0 commentedThis patch add paragraphs-item-type-bundle-name as a class to the draggable rows.
The name is "inspired" by the node-type-bundle-name class drupal adds to the body of a node form
Comment #3
jeroen.b commentedThanks, pushed to dev!
Comment #5
postovan dumitru commentedI get the following error when editing/creating a node and saving it afterwards:
Notice: Undefined index: #bundle in theme_paragraphs_field_multiple_value_form() (line 1170 of */sites/all/modules/contrib/paragraphs/paragraphs.module).
I have a complex structure with a field paragraph, containing a wrapper paragraph with custom class and ID fields and another paragraph field(which contains the paragraphs with the content).
Could we add a check for $item['#bundle'] in :
Comment #6
postovan dumitru commentedAttaching patch with the suggested change.
Comment #7
demonde commentedWhile this feature is implemented in Drupal 7, it is missing in Drupal 8.
Comment #8
chrisdarke commentedAs of PHP 7.1.0, applying the empty index operator on a string throws a fatal error. This means setting the class array to an empty string throws an error. This patch includes a fix for that. Thanks to @oadaeh for identifying that.
Comment #9
firewaller commentedI was about to re-open this, but found the referenced issue for the followup patch. Just wanted to add it here so nobody else gets confused: https://www.drupal.org/project/paragraphs/issues/3010369