Needs work
Project:
Editable Fields
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2013 at 08:08 UTC
Updated:
31 Jan 2017 at 17:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mnlund commentedAnd the patch
Comment #2
dmadruga commentedI was having problems editing a node with taxonomy terms reference fields.
Your patch solved my problem! Tks.
I just needed to make a tiny modification on the way it clears the cache (otherwise I get an PDOException table cache_entity_node doesn't exist):
Replace
cache_clear_all($element['#entity_id'], 'cache_entity_' . $element['#entity_type']);By
entity_get_controller($element['#entity_type'])->resetCache(array($element['#entity_id']));Comment #3
mnlund commentedNice catch. It wasn't tested enough with other entity types. I have added a new patch with the changes.
Comment #4
andros commentedThis patch works for me.
Is there no one to put this in the dev version?
Comment #5
wasare commentedComment #6
Renee S commentedThis no longer applies, but the problem still exists, the whole entity is being loaded/saved.
Comment #7
Renee S commentedComment #8
milos.kroulik commentedI confirm, that this doesn't work on latest dev.
Comment #9
e5sego commentedRegarding to this issue, I found that one change to an editable field within a view can influence values on other fields, which have been changed in meantime otherwise.
For example:
Field a - editable, shown on views table
Field b - normal field
1. open the views table
2. change value of b via edit node form
3. save value of a on the view (without reload)
This causes value of b is reset to the time where the views was opened (1.) Is this by design or a bug?
Comment #10
ilyasmdgh commentedThe patch worked for me on the node page but does not on the views page. On the views page it looks like it saved but on refresh the old value returns.
Comment #11
dreamer777 commentedThe same problem as #10 exists in views page. Any ideas, how this cool feature could be implemented?
Comment #12
nimek commentedTested in latest dev
line 561 (probably)
Change this
To this
That way is faster and more eficient but be aware that field_attach_update will not call node hooks like node_presave or node_update
OR more complex solution where we really save only changed field.
line 317
line 482
line 561
Works great :).
I can get maintainance of this module if somebody tell me how because I like it very much and it has a lot of panding patches.
Comment #13
nimek commentedBAsed on #12 I created patch with some adjustments.
Comment #14
nimek commentedComment #15
sadashiv commentedI was also facing a similar issue i.e.
1) Open the page with editable field in first tab
2) Now open the entity (node, or profile) in second tab.
3) Update few fields in the entity and save (don't update the editable field but other than that)
4) Go back to first tab and edit the editable field.
Now when I check I find that the fields modified in second tab are all rolled back. I did a simple change to fix this.
I was happy to provide a patch but can see the dev is different so just a diff.
Thanks,
Sadashiv.
Comment #16
joelpittetCan we check access control first that the
entity_save()is providing?