Closed (fixed)
Project:
Editable Fields
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2011 at 18:18 UTC
Updated:
17 Jul 2011 at 09:31 UTC
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 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 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 commentedShould be fixed by b81e145, where I added the name of the field to the form ID.
Comment #4
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 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 commentedFixed in commit e359ace, using a similar approach.
Comment #8
damien tournoud commentedMoving the issues back to the main project.