There are two parts to this bug which may be related. When editing click-to-edit fields while viewing a node the following occurs:
1. Input field does not close after finished editing like in D6 version (actually, it would be nice if this were configurable so that either the field stays open after save or closes after save).
2. Only the last field is saved. If I open 2 or more fields with click-to-edit, only the changes made to the last field are saved.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | editablefields-1405854-12.patch | 1.78 KB | mwsam |
| #8 | editablefields1.patch | 2.36 KB | jvizcarrondo |
| #6 | editablefields.patch | 2.03 KB | jvizcarrondo |
Comments
Comment #1
presleyd commentedI can't get multiple fields to save in any configuration. The last one changed saves reliably but any previous changes fail to save.
Comment #2
presleyd commentedMultiple editable fields (I've tested with select lists of text and textfields) behave badly. Changing just one usually seems to work but changing more than one causes problems ranging from the change just not being saved to previous changes being reverted (caching problem of some sort I assume).
As I'm in dire need of this module for 7, I'm willing to sponsor work on this module to get it polished for D7. I sent Damien T. a message a few weeks ago but I assume he does not have time to do this as I haven't heard back. If none of the maintainers are available I'll issue a public bounty next week this time.
Comment #3
earwax commentedWhy not issue the bounty now? Someone who is interested in taking this up will just wait for you to announce the bounty. In fact, they could be working on it right now and is withholding it until you announce the bounty. :)
Comment #4
presleyd commentedI was giving the maintainers a chance to respond first. It seemed polite to try not to step on any toes.
Comment #5
Coupon Code Swap commentedI can contribute some to the bounty as well. Need to get this fixed sooner than later.
Comment #6
jvizcarrondo commentedI've made a patch that seems to solve the problem Multiple fields not saved, the main problem was that the entity was always stored using old values (this was load in form creation and not in submit). Additionally I made other changes and bug #1206656: Recoverable fatal error: Argument 1 passed to drupal_array_get_nested_value() .. called in editablefields.module on line 315 also seems to be solved
hoping to have helped solve this
Juan
Comment #7
presleyd commentedI issued a bounty for these issues:
#1405854: Multiple fields not saved
#1206656: Error on Node view page: Argument 1 passed to drupal_array_get_nested_value()
#1189196: Doesn't create revision on content-type which revision option is checked.
and I think #1449750: Title field does not save changes (I'm not 100% sure if I understood the problem here but took it to just be problems saving from Views displays which I need but didn't test if it worked previously)
Mwsam has produced fixes, once I finish my tests tomorrow (so I can pay him) he'll post patches here.
Comment #8
jvizcarrondo commentedRevision problem already fix and even I am resolved to end the problem of Title Module, the issue of saving field is because current module use old entities in build form and submit not making it possible to obtain the new values, as I told you I have almost solved the problem, I think it's a little late that you say that the bounty has already been taken (two days after), but hey I'm going with the satisfaction of having contributed something in the settlement of this, I add a patch that fixes the problem of revision
hoping to have helped solve this
Juan
Comment #9
jvizcarrondo commentedOnly to help solve the issue #1449750: Does not save changes note that title is not defined in function editablefields_form and this is required in title module, see function title_field_attach_submit in ln 486, so this is never called and the field is not populate, I think the solution might be to place title available in editablefields_form maybe with access FALSE.
Comment #10
presleyd commentedSorry, the bounty went to the first to respond. We'll put up those patches tonight and the maintainers can decide which to commit.
Comment #11
jvizcarrondo commentedI have no problems, while the bounty was attractive, I will be happy if only some of my contributions to be taken to solve some of the issues
Juan
Comment #12
mwsam commentedHere is a patch against the latest 7.x-1.x branch. This the fork I used when I'm working on multiple issues of editablefields: https://github.com/mwsam/editablefields
Comment #13
jvizcarrondo commentedSeeing the two solutions we found that the problem is that entity has a old values in function editablefields_form_submit and need to read its value each time it is updated, so I think that the great challenge of the maintainer of this module is to eliminate elements that are more in the form (eg entity is not required in form, always is loaded in editablefields_form_submit) to make it optimal, but not required that the operation of the module is optimal, so do its work :-)
Juan
Comment #14
sorensong commentedAlso having issues with some items not saving using a views table.
Comment #15
johnvComment #13 made me confused about the difference between patches #8 and #12, but it seems #12 does the same and more.
I have tested #12 together with #1206656: Error on Node view page: Argument 1 passed to drupal_array_get_nested_value() with multiple editablefields on Node view page and Views displays, and it works fine, both with and without Click_to_Edit.
Since #1206656: Error on Node view page: Argument 1 passed to drupal_array_get_nested_value() does not work on its own, I'd prefer to add this patch into #1206656.
@sorensong, can you give more details about "some items not saving using a views table"?
Comment #16
presleyd commentedThis patch was committed along with #1206656: Error on Node view page: Argument 1 passed to drupal_array_get_nested_value() right? If so, we can mark this as fixed.
Comment #17
srgk commentedmultiple fields are not saved with the latest development version, also with applied patch from post 12
with table view or with html list
one by one the fileds get saved ok
Comment #18
Yuri commentedI confirm this is still happening, multiple fields are not saved.
Comment #19
mwsam commentedThe patch in #12 is not yet committed, you still need to manually apply the patch.
I did a check today using the latest code from 7.x-1.x branch and a custom content type with two text editablefields, the patch still works correctly for me, both in node and within a view (tested with table/HTML list format, show as content/fields).
@srgk @Yuri: Can you provide details on how you use/set up editablefields?
Comment #20
presleyd commentedThis should still be listed as Needs Review.
Comment #21
manuelBS commentedPach #12 works great form me. Because entity now will be new loaded after submitting the first element and the old value will not be cached any more. Thanks! Would like the patch to be committed.
Comment #22
kingswoodute commentedIf that patch works could it be committed to a dev release?
I'm having the exact same issue and would love to be able to use this module in conjunction with a view but don't want to use a patch if possible.
Thanks very much for all your work!
Comment #23
asutton commentedI am currently having this same problem. I have tried 7.x-1.0-alpha2 and 7.x-1.x-dev and saw now difference.
I attempted to apply the patch from #12 above and the first and last chunks of code passed. I manually applied the second chunk.
Basically, I am trying to expose dropdowns to users so they can change a few taxonomy terms. But, as mentioned above, all works well when one is changed, but when more than one is changed, only the last is saved. I have also tried radio buttons / checkboxes rather than dropdown boxes, to no avail.
Has the patch fixed the problem for everybody else with the current release of the module?
Thanks.
Comment #24
dags commentedManually applied, tested and committed the patch in #12 to 7.x-1.x. Thanks everyone.