Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update row order id, so last rows always delete #212 #213

Merged
merged 2 commits into from
Feb 4, 2025
Merged

Conversation

ekes
Copy link
Member

@ekes ekes commented Jan 24, 2025

Current patch only against this version. Haven't updated to the latest dev / rc because there seems to be some back and forth. Issue https://www.drupal.org/project/tablefield/issues/3441319 has branch that's up to date for dev.

What does this change?

Presently when a table has had its rows moved around the internal stored row order isn't in sync. So when you delete rows the rows that were at the bottem get deleted. Patch - see issue - fixes this.

How to test

Create some content with a paragraph table. Add rows "1", "2", "3", "4". Move "4" to be second row. 'Change number of rows/columns' to remove a row and 'Rebuild table'. Without patch "4" (now second row) is removed. With patch "3" (now forth row) will be removed.

Current patch only against this version. Haven't updated to the latest
dev / rc because there seems to be some back and forth. Issue
https://www.drupal.org/project/tablefield/issues/3441319 has branch
that's up to date for dev.
@ekes ekes requested review from finnlewis and markconroy and removed request for finnlewis January 24, 2025 15:41
@millnut
Copy link
Member

millnut commented Jan 25, 2025

Hey @ekes, do you know if tablefield 3.x is also affected? Just thinking for the D11 work we upgrade from 2.x to 3.x so we'll need to do a test there as well

@ekes
Copy link
Member Author

ekes commented Jan 25, 2025

Didn't test that one. Just the current release, and 2.x dev.

@millnut
Copy link
Member

millnut commented Jan 25, 2025

👍 I'll give it a quick test the next time I start up the D11 project

@ekes ekes requested a review from finnlewis January 28, 2025 10:05
@finnlewis
Copy link
Member

I'll test this too.

Copy link
Member

@finnlewis finnlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, confirmed the original bug and that the patch fixes it.

Thanks @ekes !

@ekes ekes merged commit 1eabfe8 into 2.x Feb 4, 2025
13 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants