Problem/Motivation
Steps to reproduce:
- Edit node
- Add a 'paragraph library' paragraph entity to a paragraph entity reference revision field.
- Save node
- View the node edit form
Result:
-
Presented with:
Notice: Undefined index: field_reusable_paragraph in paragraphs_library_preprocess_paragraph() (line 145 of modules/contrib/paragraphs/modules/paragraphs_library/paragraphs_library.module).and a stack-trace
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | paragraphs-3145886-5.patch | 951 bytes | primsi |
| #5 | paragraphs-3145886-5.interdiff.txt | 1.18 KB | primsi |
| #3 | paragraphs-3145886-3.patch | 895 bytes | peterhebert |
Comments
Comment #2
peterhebert commentedI can confirm this issue is happening, Drupal 8.9.1. Looks like the view mode is directly under 'elements':
should be:
Comment #3
peterhebert commentedadding patch for solution mentioned in #2
Comment #4
berdirThat's not necessarily the same thing. The current view mode is the one configured on the entity reference field and is the correct one to use. The one on the main element is the view mode on the paragraph, that might or might not be the same.
Comment #5
primsi commentedPatch for the approach in #4.
Comment #6
berdirThanks, I think just not doing anything if the expected data is not there is the right approach. Could also happen if the field is configured to use a different widget like label, but I don't see how we could do anything useful then here if the data doesn't match our expectation.
Committed.
Comment #9
spacerabbit commentedThanks! That worked for me on paragraphs 8.x.1.12