Created
June 18, 2017 19:57
-
-
Save alex-bukach/97f41336e123f8b531003672fbc6e2f5 to your computer and use it in GitHub Desktop.
Variation of https://www.drupal.org/node/2853973 for the case when https://www.drupal.org/node/2853167 is already applied
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Plugin/views/field/DraggableViewsField.php b/src/Plugin/views/field/DraggableViewsField.php | |
index bfade16..93c4420 100755 | |
--- a/src/Plugin/views/field/DraggableViewsField.php | |
+++ b/src/Plugin/views/field/DraggableViewsField.php | |
@@ -62,7 +62,7 @@ class DraggableViewsField extends BulkForm { | |
// Item to keep id of the entity. | |
$form[$this->options['id']][$row_index]['id'] = array( | |
'#type' => 'hidden', | |
- '#value' => $row->{$this->definition['entity field']}, | |
+ '#value' => $this->getEntity($row)->id(), | |
'#attributes' => array('class' => array('draggableviews-id')), | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment