The "autoclose" option for views megarow prevents any changes from actually being saved. I don't have a solution, but I think I've tracked down the issue. In function node_form_submit_build_node (node.pages.inc line 509) drupal calls form_execute_handlers prior to returning the node object.

The submit handler for views_megarow calls drupal_exit - I think this call is short-circuiting the normal node_submit process.

Repro steps:
New drupal install - minimal profile
enable views_ui, views_megarow
create content type
create node of that type
Create new view of content showing fields with format Megarow Table
In Megarow settings, check "automatically close the megarow".
add a NID field
Add megarows link field with the links "edit|node/[nid]/edit"
Save the view.
Go to the view and click on edit.
Make some changes to the node.
Click save.

The megarow will close, but nothing else happens.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

delzhand’s picture

Even stranger, with this same setup, checkboxes can be checked and saved, but not unchecked - regardless of autoclose status.

sepehr.sadatifar’s picture

Status: Active » Needs review
FileSize
944 bytes

@delzhand this worked for me, pls test.

delzhand’s picture

Works like a charm for the main issue. I suspected the answer was going to be something like this based on the comments for node_form_submit_build_node.

Thanks!

I suspect the second issue is actually unrelated. Maybe something about php's handling of 0/false/null. I'm looking into that this morning.

delzhand’s picture

Confirmed, second issue is unrelated to Views Megarow.

https://www.drupal.org/node/2405973

Artusamak’s picture

Status: Needs review » Fixed

Good catch, thanks for the report & the patch, it's committed: http://cgit.drupalcode.org/views_megarow/commit/?id=9bfa06ad4a075a14dce3...

Status: Fixed » Closed (fixed)

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