Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm use Embedded widget with two fields in my Field Collection. I'm create node and fill Field Collection fields. After save node, I'm click Node Edit button and see crashed form (JavaScript don't work properly)
P.S. Sorry for bad English
Comment | File | Size | Author |
---|---|---|---|
#16 | field_collection-colSpan-fix-1280568-16-7.patch | 606 bytes | basvanderheijden |
Comments
Comment #1
thismax CreditAttribution: thismax commentedInteresting -- I just ran into exactly the same issue, using Field Collection 7.x-1.0-beta2. Any help here would be appreciated.
Javascript error I'm seeing in Chrome:
Uncaught TypeError: Cannot read property 'colSpan' of undefined. tabledrag.js:152
Comment #2
sashken2 CreditAttribution: sashken2 commentedAnybody can help solve this problem?
Comment #3
rlnorthcuttI'm hitting the same problem (using the latest dev from Nov. 15th). In Chrome, I am getting these errors:
"Uncaught TypeError: Cannot read property 'colSpan' of undefined
Uncaught TypeError: Cannot read property 'className' of undefined"
From tabledrag.js:149
All other modules and core are updated and seem to be working fine.
Comment #4
rlnorthcuttDIRTY HACK
Thanks for the lead here : http://drupal.org/node/1327066, I have a dirty hack for the tabledrag.js that seems to work. It basically just removes the table for the embedded field collection from inspection by JS. Replace line 128 from:
to
Obviously this is not a good fix, but it keeps me moving down the road while under a deadline!
Comment #5
kevinquillen CreditAttribution: kevinquillen commentedConfirmed. Definitely a bug. Happens to me too. It breaks any entity form that employs Field Collections and collapsible fieldsets. It also happens if the widget type is Table.
Chrome 17, Drupal 7.10, FC 7.x-1.0-beta3
Is there a way to intercept tabledrag.js actions with jQuery and insert that exception other than hacking core?
Comment #6
kevinquillen CreditAttribution: kevinquillen commentedFollowing up with #4, you also need to do this for the other FC edit methods:
But you can simplify it for Field Collection by just adding this instead:
There must be some way to affect this with an external jQuery script without touching core.
The other problem here too, is that row weights are shown without having to click 'Show Row Weights'- which has no effect on FC tables edits.
Comment #7
tim.plunkettCan someone provide an export of their content type with Features and attach it here?
Comment #8
TelFiRE CreditAttribution: TelFiRE commentedIs this something that was never resolved or committed?
Comment #9
deejmer CreditAttribution: deejmer commentedI'm still having this issue as well. Focus Field Crop, expanding javascript widgets, etc are all broken. It seems any javascript held inside of the Field Collection is disabled....anyone?
Comment #10
petrovnn CreditAttribution: petrovnn commentedDIRTY HACK №2
comment this lines in file:
\misc\tabledrag.js
sorry for hacking core... very sorry...
DIRTY HACK #4 (2011) not working for me now
Comment #11
perelesnyk CreditAttribution: perelesnyk commentedHave spent a whole load of time debugging this issue. What I think the bug source is line 1431 of field_collection/field_collection.module
If you remove or comment the last condition
&& $instance['widget']['type'] == 'field_collection_embed'
everything works just fine.
Because of this condition there is no proper count correction for the 'field_collection_table' widget type. Thus adding one extra row without proper number of cells (because of wrong delta in field_add_more_js():474, which was 2 instead of 1 for the second item etc.) - and the improper number of cell induced JS crash (in /misc/tabledrag.js).
Comment #12
lonehorseend CreditAttribution: lonehorseend commented#11 worked well for me, except now the line number is 1469 as of the 4/16/14 dev version.
Comment #13
bjcooper CreditAttribution: bjcooper commented#11 worked for me as well. It appears that line of code makes Field Collections in multi-valued fields incompatible with non "field_collection_embed" widgets.
Comment #14
Piratawww CreditAttribution: Piratawww commented#11 Works fine! Thxx
Comment #15
samonenko CreditAttribution: samonenko commented#11 worked for me! Thank you!
Comment #16
basvanderheijden CreditAttribution: basvanderheijden as a volunteer commentedAs so many people ran into the same issue (including me), I've created a patch that you can apply to fix the issue.
Comment #17
tim.plunkettComment #18
Chris Matthews CreditAttribution: Chris Matthews commentedThe patch in #16 applied cleanly to the latest 7.x-1.x-dev and fixes this issue for me (and many others) so I'm changing the status to RTBC.
Checking patch field_collection.module...
Hunk #1 succeeded at 1231 (offset -286 lines).
Applied patch field_collection.module cleanly.
Comment #20
ram4nd CreditAttribution: ram4nd as a volunteer commented