Drag-and-drop does not work for some fields: e.g. title, post date, etc. (though works for other - body, image, links). I am able to initiate the drag but I am not able to drop it to another region.
This is the js error. Handling fields through "Show row weights" works fine.
tabledrag.js?v=8.3.0-beta1:957 Uncaught TypeError: Cannot read property 'relationship' of undefined
at Drupal.tableDrag.updateField (tabledrag.js?v=8.3.0-beta1:957)
at Drupal.tableDrag.updateFields (tabledrag.js?v=8.3.0-beta1:936)
at Drupal.tableDrag.dropRow (tabledrag.js?v=8.3.0-beta1:776)
at HTMLDocument. (tabledrag.js?v=8.3.0-beta1:243)
at HTMLDocument.dispatch (jquery.min.js?v=2.2.3:3)
at HTMLDocument.r.handle (jquery.min.js?v=2.2.3:3)
Comment | File | Size | Author |
---|---|---|---|
#9 | 2855327-ds-9.patch | 456 bytes | tim.plunkett |
#6 | 2855327-6.patch | 475 bytes | swentel |
Comments
Comment #2
mrtndlmt CreditAttribution: mrtndlmt commentedSame issue over here. Searching for a solution.
Comment #3
aspilicious CreditAttribution: aspilicious commentedThere is a problem with fields that are set in the "disabled" region. You can't drag them into the main regions. (the region doesn't gets changed while dragging)
We use the core field UI javascript but core doesn't have fields in the disabled region by default.
I think we need to fix this in core but we could fix it by overwriting the field UI javascript like we did before.
Comment #4
swentel CreditAttribution: swentel as a volunteer commentedLooking at this in the train back to belgium.
So, all core fields also have the 'parent' column filled with 'content' and 'hidden' when a ds layout is chosen, but our ds fields don't, is this something that we have to take over as well. I'm a bit confused here why parent exactly is used anyway, will check what core is doing.
Comment #5
swentel CreditAttribution: swentel as a volunteer commentedOk, so this parent thing doesn't look like a problem, digging further
Comment #6
swentel CreditAttribution: swentel as a volunteer commentedSo, it's a class thing :) (relying on classes isn't the safest thing, but oh well)
We should probably try to write a js test for this, maybe commit this first and then see. (or even a ridiculous hard coded xpath check on the output to make sure we never delete this class)
Note: maybe we can even remove the 'ds-field-region' class, I don't really think we use it anymore right ?
Comment #7
aspilicious CreditAttribution: aspilicious commentedyes, we can change the classname and commit. We don't have custom JS anymore.
Comment #8
cmwelding CreditAttribution: cmwelding commentedFacing same problem with the latest developmental release. Cannot drag a field from hidden region to active regions.
Comment #9
tim.plunkettMade the change of #7, manually tested, all is well.
Comment #11
swentel CreditAttribution: swentel as a volunteer commentedcommitted and pushed
Comment #13
Nylsoo CreditAttribution: Nylsoo as a volunteer commentedThe error still occurred for me. I had to apply the following patch to fix it for me:
https://www.drupal.org/files/issues/2866211-field_group-tabledrag-issue....
Comment #14
aspilicious CreditAttribution: aspilicious commentedI'll test this tonight
Comment #15
aspilicious CreditAttribution: aspilicious commentedFieldgroup has a new branch.