Problem/Motivation
Relationship id is missing in "file_to_node", "node_to_file", "file_to_user", "user_to_file" and other file related relationships.
Steps to reproduce
-------- From original summary - ---------------
I am trying to add a relationship "file usage" to a view. I click the submit button, but the relationship never gets added and UI never closed. I can add other relationships as expected.
To replicate (with "standard" profile):
- Create a new view listing node content (no displays need to be added).
- Don't touch the base view config in any way (the default "title" field will be the only field, etc.)
- Add a File Usage "File" relationship via the UI
After these steps the relationship config dialog reports "The handler for this item is broken or missing" and no config form is displayed. The relationship can then be saved on the view (without configuration) but cannot be used.
Immediately upon adding the relationship an error similar to the following is printed in the views UI:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fid' in 'field list': SELECT node_field_data.created AS node_field_data_created, node_field_data.nid AS nid, fid AS fid FROM {node_field_data} node_field_data WHERE (( (node_field_data.status = :db_condition_placeholder_0) )) ORDER BY node_field_data_created DESC LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1 )
And a barrage of notices are logged, containing and/or repeating:
Notice: Undefined index: id in Drupal\views\Plugin\ViewsHandlerManager->getHandler() (line 109 of /var/www/drupal-8/core/modules/views/src/Plugin/ViewsHandlerManager.php).
Notice: Undefined variable: items in Drupal\views\Plugin\views\relationship\Broken->buildOptionsForm() (line 79 of /var/www/drupal-8/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php).
Notice: Undefined index: original_configuration in Drupal\views\Plugin\views\relationship\Broken->buildOptionsForm() (line 61 of /var/www/drupal-8/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php).
Proposed resolution
- Add standard
relationship id
Remaining tasks
Needs review
User interface changes
N/A
API changes
N/A
Data model changes
N/A