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

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

ecj created an issue. See original summary.

cilefen’s picture

Status: Active » Postponed (maintainer needs more info)

This 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?

ecj’s picture

Just 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!

ecj’s picture

Issue summary: View changes

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

chrissnyder’s picture

The patch mentioned in #3 failed to apply to Drupal 9.5.9. However, the patch linked in this comment did work.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Seems like it was a duplicate from the comments.