- Issue created by @bvoynick
- π¦πΊAustralia thomwilhelm Sydney
Just coming here to report similar issues, all my tablefields got broken after testing the upgrade to the latest tablefield version.
This change should have been at least mentioned in the 2.4 release:
https://www.drupal.org/project/tablefield/releases/8.x-2.4 β
- πΊπΈUnited States swirt Florida
Confirmed. This breaks decoupled sites because the code adds weight data at the form level, then removes the data on render. However in decoupled sites (through graphQL or JASONAPI) the weight data is not removed and the FrontEnd has no idea there is extra data to remove.
- πΊπΈUnited States swirt Florida
Duplicate of https://www.drupal.org/project/tablefield/issues/3221175 π Column weight is shown as a seperate column Active
- πΊπΈUnited States tsquared212 Chicago, IL
+1. Adding a patch that disables the weighted data.
- πΊπΈUnited States tsquared212 Chicago, IL
+1. Added a patch that disables the weighted rows for those who may find it useful.
- πΊπΈUnited States swirt Florida
In looking at the submitted patch, I think it needs to go deeper and revert all the related code.
https://git.drupalcode.org/project/tablefield/-/commit/26d63be6aa25d34d1...This would of course wipe out the option of drag and drop, but it "un-breaks" the module for anyone that is running a decoupled site and is now dealing with extraneous data being added to content.
- πΊπΈUnited States tsquared212 Chicago, IL
Good call, swirt.
This should roll back the changes made in Issue 3040358 - Drag table rows (https://git.drupalcode.org/project/tablefield/-/commit/26d63be6aa25d34d1...).
- Status changed to Needs review
over 1 year ago 9:06pm 23 March 2023 - πΊπΈUnited States swirt Florida
Thanks @tsquared212 this does what it needs to and is being used on our production. Data saved under the un-patched code, needs to have the extra column removed and re-saved. I am changing this to RTBC.
HOWEVER, this is really a stop-gap measure as it reverts the draggable table rows. At some point, the solution that @bvoynick suggested should be looked into as a more permanent fix.
- Status changed to RTBC
over 1 year ago 8:06pm 3 May 2023 - π¨π¦Canada smulvih2 Canada π
Patch #9 works for me on 2.4.0, +1 for RTBC.
- π§π¬Bulgaria pfrenssen Sofia
This is causing warnings in the Charts Field Formatter contrib module, ref π Undefined array key warning with Tablefield 2.4 Needs review .
- First commit to issue fork.
- Status changed to Needs work
9 months ago 5:20pm 28 February 2024 - π¬π§United Kingdom james.williams
As the patch at #9 is only a stop-gap approach, I guess this ticket should be 'needs work'.
In the meantime, how about an approach like this patch, to change what's considered 'empty', with the same condition as the formatter? That way, the field will get wiped on saving, if the weight is the only thing that's saved in the table. I've also replaced a
!empty($cell)
withstrlen($cell)
because otherwise the number '0' isn't considered a non-empty cell value. - πΊπΈUnited States swirt Florida
Those are good points @james.williams. Just a note that neither @tsquatred212 nor I are on the project that had a need for this fix. It is not that I don't want to see this fixed, I just no longer have an existing site that was broken by this to test this against.
- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
This is a re-roll of patch #9.
- last update
7 months ago 2 pass - last update
7 months ago 1 pass, 2 fail - last update
7 months ago 2 pass - last update
7 months ago 1 pass, 2 fail - π¨π¦Canada Liam Morland Ontario, CA π¨π¦
This is a re-roll of patch #18 with coding standards fixed.
- last update
7 months ago 2 pass - last update
7 months ago 1 pass, 2 fail