Don't use view render() method, instead use preview() method, because render() method breakable embedded view.
\Drupal\views\ViewExecutable::render() comment:
" * Renders this view for a certain display.
*
* Note: You should better use just the preview function if you want to
* render a view."| Comment | File | Size | Author |
|---|---|---|---|
| #5 | vfv-entity-ref-issue.jpg | 91.79 KB | crutch |
| #5 | vfv-entity-ref-correct.jpg | 48.88 KB | crutch |
| #5 | vfv-custom-plain-text-issue.jpg | 71.15 KB | crutch |
| #5 | vfv-custom-plain-text-correct.jpg | 47.46 KB | crutch |
| #5 | vfv-view2.jpg | 197.86 KB | crutch |
Comments
Comment #2
nevergoneComment #3
nevergoneComment #4
damienmckennaComment #5
crutch commentedPatch applies and seeing no issues. Below may be a different issue than this but I thought this may fix what we are experiencing but it didn't.
We are still having the problem where views-field-view embed content disappears (when text is displayed) or shows multiple (when entity reference is used) when editing a parent view.
For example
View 1:Block 1: contains view-field-view embed field.
View 2: contains views embeds. It is used in View 1 and other Views.
When editing any part of View 1:Block 1 and saving, the embedded content disappears for plain text or it displays multiples of an entity reference. In order to get back to normal, we must go to View 2 and simply Save. It then reappears (text) or reduces to a single item (entity ref).
Any combination of {{ raw_arguments.nid }} {{ raw_fields.nid }} on both Views has no effect.
There are no errors and is happening for beta and dev.
Comment #6
vladimirausApplies and works
Thanks for the commit and testing 🍻
Comment #7
vladimirausThank you everyone for your contributions.
Merged. 🍻