When adding an item through the Autocomplete dragtable widget, if user don't fill the textfield it will accept the value and insert an empty record / row on the table, after some debug I have found that there is any check or validation if the user has filled the input or it is empty.
More specifically issue comes from the function addItemAjax() on line 317.
1. Login as admin
2. Navigate to Web -> Structure -> Entity Queue. Click view Subqueues of any available queue
3. Click Edit item.
4. Click Add item without typing anything in the autocomplete field. One empty entry is added.
Attached screenshot for reference.
My proposed solution is to add the following code on line 323 to 328.
This will prevent to return on the Ajax responde the array element to be inserted on the 'items-wrapper'.
// No value inserted on the input or empty value,
// we don't replace the 'items-wrapper', this
// will prevent to add empty values.
if ($element['add_more']['new_item']['target_id']['#value'] === '') {
return $element;
}
Fixed
1.2
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.