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.
Thanks for the great work.
Right now, you can only have one field editable on a row. The last one on the row seems to win.
Comments
Comment #1
mstrelan CreditAttribution: mstrelan commentedActually, it seems that the last one that is saved will win. For example if you go an update column C, then column A then column B then the changes from column C and A will be lost and only column B is saved. You can refresh the page, edit column A, refresh, edit column C and then you'll get the desired result.
Without looking at the code I would guess that the original node object is stored and when you edit a field the original node + the change is saved to the database. When a field is edited the "original" that is stored also needs to be updated.
Comment #2
mstrelan CreditAttribution: mstrelan commentedI was able to solve this for nodes with the following:
This is obviously not the generic way to do it, but by setting $reset = TRUE you always get the latest from the database before saving. It is also rather inefficient, but perhaps necessary.
Comment #3
Damien Tournoud CreditAttribution: Damien Tournoud commentedShould be fixed by b81e145, where I added the name of the field to the form ID.
Comment #4
Damien Tournoud CreditAttribution: Damien Tournoud commentedActually, it's not fixed.
The problem is that we are storing the entity in the form cache, and resaving the whole entity which overrides the changes you might have done in some other field.
Comment #5
mstrelan CreditAttribution: mstrelan commentedDamien - any comment on the approach in #2? I am sure you would know of a beter way.
Comment #6
jerdavisI used the approach in #2, with a minor change - this works well for me.
Comment #7
Damien Tournoud CreditAttribution: Damien Tournoud commentedFixed in commit e359ace, using a similar approach.
Comment #8
Damien Tournoud CreditAttribution: Damien Tournoud commentedMoving the issues back to the main project.