Closed (fixed)
Project:
Field collection
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2011 at 16:32 UTC
Updated:
15 Mar 2019 at 16:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
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:152Comment #2
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 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 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 commentedIs this something that was never resolved or committed?
Comment #9
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 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 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 commented#11 worked well for me, except now the line number is 1469 as of the 4/16/14 dev version.
Comment #13
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 commented#11 Works fine! Thxx
Comment #15
samonenko commented#11 worked for me! Thank you!
Comment #16
basvanderheijden 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 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 commented