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.

Comments

presleyd’s picture

Title: Multiple fields not saved with click to edit » Multiple fields not saved

I can't get multiple fields to save in any configuration. The last one changed saves reliably but any previous changes fail to save.

presleyd’s picture

Multiple 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.

earwax’s picture

Why 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. :)

presleyd’s picture

I was giving the maintainers a chance to respond first. It seemed polite to try not to step on any toes.

Coupon Code Swap’s picture

I can contribute some to the bounty as well. Need to get this fixed sooner than later.

jvizcarrondo’s picture

StatusFileSize
new2.03 KB

I'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

presleyd’s picture

I 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.

jvizcarrondo’s picture

StatusFileSize
new2.36 KB

Revision 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

jvizcarrondo’s picture

Only 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.

presleyd’s picture

Sorry, the bounty went to the first to respond. We'll put up those patches tonight and the maintainers can decide which to commit.

jvizcarrondo’s picture

I 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

mwsam’s picture

Status: Active » Needs review
StatusFileSize
new1.78 KB

Here 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

jvizcarrondo’s picture

Seeing 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

sorensong’s picture

Also having issues with some items not saving using a views table.

johnv’s picture

Comment #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"?

presleyd’s picture

This 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.

srgk’s picture

Status: Needs review » Active

multiple 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

Yuri’s picture

I confirm this is still happening, multiple fields are not saved.

mwsam’s picture

The 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?

presleyd’s picture

Status: Active » Needs review

This should still be listed as Needs Review.

manuelBS’s picture

Pach #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.

kingswoodute’s picture

If 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!

asutton’s picture

I 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.

dags’s picture

Priority: Critical » Normal
Status: Needs review » Fixed

Manually applied, tested and committed the patch in #12 to 7.x-1.x. Thanks everyone.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.