I get the error below when I dropped after drag and row sticks to mouse and drop wont work without clicking.

Uncaught TypeError: Cannot read property 'relationship' of undefined

Then I debugged and find out that "draggableviews-parent" class is missing from the second hidden input in second td. When I add it manually it worked without error.

In DraggableViewsField.php this is where "draggableviews-parent" is added to input

line 70:
$form[$this->options['id']][$row_index]['parent'] = array(
'#type' => 'hidden',
'#default_value' => $draggableviews->getParent($row_index),
'#attributes' => array('class' => 'draggableviews-parent'),
);

In Bootstrap theme https://www.drupal.org/project/bootstrap there is a twig file for inputs as follows :

{% spaceless %}
{% if input_group %}

{% endif %}

{% if prefix %}
{{ prefix }}
{% endif %}

{% block input %}
//this is where attributes is added to input
{% endblock %}

{% if suffix %}
{{ suffix }}
{% endif %}

{% if input_group %}

{% endif %}

{{ children }}
{% endspaceless %}

Altough it adds attributes somehow "draggableviews-parent" is missing from output.

Comments

tanmuhittin created an issue. See original summary.

Znak’s picture

Status: Active » Postponed

I can't reproduce your problem, it's work fine on my website.

iStryker’s picture

Status: Postponed » Fixed
Related issues: +#2729935: Error when using bootstrap theme

This is fixed in #2729935: Error when using bootstrap theme. Both problems are about the draggableviews-parent class. Please reopen if I am wrong.

Status: Fixed » Closed (fixed)

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