i made the upgrade to the last dev (somthing done last week) and the editablefields for price field stop working.
1!--form-item-commerce_price_1--0-->
this is what it displays instead of the price editable field.

the view it's content view with product reference relationship

CommentFileSizeAuthor
#36 editablefields-1327458-36.patch563 bytesDane Powell
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Project: Commerce Core » Editable Fields
Component: Views integration » Code

I don't see how this can be a problem w/ Commerce. Nothing has changed in the Price field form elements in some time, afaik.

vasike’s picture

because it worked and the drupal commerce was the upgraded one.

itserich’s picture

Similar error when upgrading to the latest Views Development version.

Reverted to a prior Views Development version and the error is gone.

In my case it is a normal View consisting of a regular Text Field inside a regular Content Type. Drupal Commerce is installed but not related to this error in my case, I think.

rszrama’s picture

@vasike - as I said above, nothing has changed with the Price field form lately. Are you sure you didn't update anything else at the same time? Drupal Commerce is only tested to work against the latest actual release (i.e. non-dev version) of Views. But I'm not sure why that would affect editablefields.

latulipeblanche’s picture

I installed "Editablefields" (7.x-1.0-alpha1) on Drupal Commerce (7.x-1.0).

I got a problem with the calculation of the total price of an order.

A product costs 1€.
In the View of all the products (where I use "Editablefields" for price) I changed the price to 1.10€.
The price changed in the Product-Display.
I changed the price back to 1€. The price changed again in the Product-Display to 1€, so OK.

But .....

When a client bought that product, the Total Price of the order was 2.10€ higher than the real price.
( 5 x 1€ was 7.10€ and not 5€ )

vasike’s picture

@ rszrama : my fault. it was more a hunch.

it seems that @itserich is more accurate

GiorgosK’s picture

marked my issue as duplicate [#] and chimming in

editablefields stopped working altogether after update of views to latest dev and ctools
can anybody else confirm this ?

GiorgosK’s picture

should this be posted in views ?

GiorgosK’s picture

Title: editablefields won't work for Price anymore » editable fields don't work after update to latest views and ctools dev

meant to change title

Yuri’s picture

Priority: Normal » Critical

Yes I confirm that editablefields is not working any more with the latest Views dev version.
Critial.

GiorgosK’s picture

Priority: Critical » Major

Yuri we are working with dev version and its not something that breaks a system unusable so it can't be critical (read priority link) but I will try at major

still we don't know if this should be posted to views
maintainer should comment on that

AABoyles’s picture

Same problem, can confirm that it's an issue between the current views dev version and editablefields (i.e. I'm not running Commerce).

Vagabondo’s picture

Same problem, but then I did a test.
I tried to use Editablefields in Panels, without using Views. Fields look good there, but when I tried to change the value, I got this pop-up alert:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /system/ajax
StatusText: Service unavailable (with message)
ResponseText: Recoverable fatal error: Argument 1 passed to drupal_array_get_nested_value() must be an array, boolean given, called in [...]sites/all/modules/editablefields/editablefields.module on line 315 and defined in drupal_array_get_nested_value() (line 6364 of [...]includes/common.inc).

Then probably the conflict is first of all with the latest ctools. Hope this can help.

Edit: In spite of this error message, the new field value entered with editable fields was saved correctly

AABoyles’s picture

I don't think it's a ctools problem. I got the issue after updating views, and I haven't updated ctools. I think that error is something else entirely (I believe it comes from using editablefields with Panels). See http://drupal.org/node/1206656#comment-5214648 for more background on that.

Yuri’s picture

@14: I'm having this issue without Panels installed.

johnv’s picture

Title: editable fields don't work after update to latest views and ctools dev » editable fields & latest Views/CTools show "1!--form-item-<my_fieldname>--0-->"

Same as #15: I'm having this issue without Panels installed.

johnv’s picture

Title: editable fields & latest Views/CTools show "1!--form-item-<my_fieldname>--0-->" » editable fields don't work after update to lat » editable fields & latest Views/CTools show "1!--form-item-<my_fieldname>--0-->"

I just copied the code from the 'normal' case to the 'views_view' case, and it seems to work fine:
[EDIT] when 'click to edit' is not set.

     $field_id = array_search($views_field, $view->field, TRUE);

     $items = array(0 => array());
     return array(
-      0 => '<!--form-item-' . $field_id . '--' . $row_id . '-->',
+      0 => drupal_get_form('editablefields_form__' . $entity_type . '__' . $id . '__' . $vid . '__' . $field['field_name'], $entity_type, $entity, $field, $instance, $langcode, $display),
     );
   }
itserich’s picture

Title: editable fields & latest Views/CTools show "1!--form-item-<my_fieldname>--0-->" » editable fields don't work after update to latest views and ctools dev
Status: Active » Needs review
itserich’s picture

Title: editable fields don't work after update to latest views and ctools dev » editable fields & latest Views/CTools show "1!--form-item-<my_fieldname>--0-->" » editable fields don't work after update to lat
Yuri’s picture

applying #17 (and flush cache) throws exactly same ajax error as in #13 for 'click to edit' fields.
The field looks as it should without clicking it, but still not editable.

ShadowMonster’s picture

subscribe

GiorgosK’s picture

@shadowmonster
there is a follow button on top right use that instead

AABoyles’s picture

Title: editable fields & latest Views/CTools show "1!--form-item-<my_fieldname>--0-->" » editable fields & latest Views/CTools show "1!--form-item-<my_fieldname>--0-->" » editable fields don't work after update to lat

I'm not using Click-to-Edit, and #17 worked to make the interface come back, but it also triggered the same error as #13.

johnv’s picture

AABoyles, #13 and #14 are off-topic, (as you stated yourself ;-) ) see: #1206656: Error on Node view page: Argument 1 passed to drupal_array_get_nested_value()

AABoyles’s picture

Perhaps I should clarify: I was just affirming that the hack in #17 fixes this issue for a subset of EditableFields users and creates a new one for those who use this approach.

ShadowMonster’s picture

@GiorgosK
yep - sorry old habbit

sun-fire’s picture

The same error. In my case it was happend with term reference field.

hampshire’s picture

Same problem trying this with VBO on a fresh install with the newest versions of everything. I am not using Panels or Commerce. Does this module work for anyone who's install is up to date?

AndrzejG’s picture

I also have this problem, please see http://drupal.org/node/1345886.
Some details there.

Dane Powell’s picture

Priority: Major » Critical
Status: Needs review » Needs work

It sounds like the only progress towards a solution so far is #17, and it's incomplete...

Also, I don't see why this is not critical- it's effectively a security issue, since it blocks the upgrade to a secure release of Views.

AndrzejG’s picture

Priority: Critical » Major
Status: Needs work » Needs review

Probably now this is only with newest Views, not CTools.
I have dev version of CTools from Nov. 16th. Now, returned to critical Views RC1, and Editable fields are working.

Dane Powell’s picture

Priority: Major » Critical
Status: Needs review » Needs work

Please don't change the priority/status without a good explanation for why...

AndrzejG’s picture

I didn't change. And don't know who.

j_ten_man’s picture

Here is how I fixed the issue:
Editable fields line 232-234:

    return array(
      0 => array('#markup' => '<!--form-item-' . $field_id . '--' . $row_id . '-->'),
    );

For someone who knows Views better than I do, the issue was that in views_handler_field_field.inc the set_items function is expecting this to be an array as it sets a '#access' value which is why it was displaying 1!--form-item-commerce_price_1--0--> instead of <!--form-item-commerce_price_1--0-->. Line 778 of the module. Hopefully it works for others.

Vagabondo’s picture

#34 Works perfectly for me
Thank you! :-)

Dane Powell’s picture

Status: Needs work » Needs review
FileSize
563 bytes

Here's a patch based on #34...

badsit’s picture

#34 and patch from #36 works for me too..
thanks!

johnv’s picture

Status: Needs review » Reviewed & tested by the community

same for me => RTBC

Damien Tournoud’s picture

Status: Reviewed & tested by the community » Fixed

Merged into 7.x-1.x. Thanks for the patch, guys!

I'm releasing alpha2 with this patch.

Status: Fixed » Closed (fixed)

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