The DefaultSelection constructor is changing in #2174633: View output is not used for entityreference options, which is called by the ParagraphSelection constructor here (as the latter extends the former). It will be necessary to pass in the renderer.

This shouldn't be merged until the above issue is fixed in core.

You'll know you're hitting this issue when you get the following error:

The website encountered an unexpected error. Please try again later.
ArgumentCountError: Too few arguments to function Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection::__construct(), 6 passed in /path/to/drupal/modules/contrib/paragraphs/src/Plugin/EntityReferenceSelection/ParagraphSelection.php on line 54 and exactly 7 expected in Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection->__construct() (line 53 of core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php).

Patch forthcoming.

Comments

colan created an issue. See original summary.

colan’s picture

colan’s picture

Title: Add support for view output as entity reference options » Add Paragraphs support for view output as entity reference options
colan’s picture

Issue summary: View changes

For findability, added error message users will see when this issue becomes apparent.

keithdoyle9’s picture

Version: 8.x-1.x-dev » 8.x-1.2

Also having this issue when trying to upgrade from 8.3.7 to 8.4.4 and using embedded views via drupal_view().

colan’s picture

Version: 8.x-1.2 » 8.x-1.x-dev

#5: I'm not sure that makes sense as the parent issue here hasn't even been committed to core yet. You're probably running into another issue that looks the same.

benjifisher’s picture

The patch from #2 is working for me with Drupal 8.4.5 and the patch from #190 on #2174633: View output is not used for entityreference options. Thanks!

dinesh18’s picture

Could you please help me, I am facing similar issue when I pushed my changes from local machine to dev site.
I didn't faced any issue in my local machine. Could you please help me what is the root cause of such issue ?
Do we really need this patch to fix it ?

ivan616’s picture

Patch from this thread stopped working with new core update.
Currently testing and there seems to be no issues after removing it.

Will update if i run into something.

colan’s picture

Status: Postponed » Closed (outdated)

If I remember correctly, we added something in the other patch a while ago to make this unnecessary. Please reopen if I'm forgetting.