Problem/Motivation
In views, first selecting relationship, then selecting FORMAT>Show:>entity, can't change to another display.
When removing relationship, then you can change display, then select Relationship. - OK
Steps to reproduce
Fails: 1) select Relationship, then 2) try to select display (error thrown)
TypeError: Drupal\views\Plugin\views\relationship\RelationshipPluginBase::init(): Argument #2 ($display) must be of type Drupal\views\Plugin\views\display\DisplayPluginBase, array given, called in /srv/sites/drupal9/docroot/core/modules/views/src/Plugin/views/row/RowPluginBase.php on line 93 in Drupal\views\Plugin\views\relationship\RelationshipPluginBase->init() (line 64 of
etc.
Proposed resolution
t.b.d.
Current work around: remove relationship and all its dependencies, select the desired display, (re)configure the relationship and its dependencies.
or: apply d10 patch: https://www.drupal.org/files/issues/2022-09-27/2457999-300.patch
Comments
Comment #2
cilefen commentedThis looks a possible duplicate of #2457999: Cannot use relationship for rendered entity on Views which is fixed in Drupal 10.1. It has not been backported. Can you confirm?
Comment #3
ecj commentedJust applied this d10 patch with fingers crossed, and yes it seems to work:
Cannot use relationship for rendered entity on Views 2457999-300.patch
If I do experience any troubles with this patch, I'll come back on this subject in this issue. Thanks!
Comment #4
ecj commentedComment #6
chrissnyderThe patch mentioned in #3 failed to apply to Drupal 9.5.9. However, the patch linked in this comment did work.
Comment #8
smustgrave commentedSeems like it was a duplicate from the comments.