I have a node with Paragraph Entity field, where I can add multiple paragraphs.
When I select first paragraph It is expanded and if I do not fill required fields and try to save, warring does not allow me to save the node. That is great.
But when I do not fill required field and add second paragraph, the first one paragraphs is shrank and its fields are collapsed. If I fill the second paragraph correctly and try to save, the operation is successful and required field in paragraph one is saved with empty value.
This is a big problem and I think first paragraph should be validated when try to add second.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Screenshot from 2019-07-05 19-23-17.png | 141.52 KB | supriya1992 |
| #3 | Screenshot from 2019-07-05 19-03-13.png | 126.98 KB | supriya1992 |
Comments
Comment #2
supriya1992 commentedComment #3
supriya1992 commentedHi,
I have checked the scenario that you mentioned above. The solution for this problem is as follows:
1. First create a paragraph types and make the fields required as per your requirements.
2. Now use it where you want, for example use in a content type xyz.
Now if you "add more" paragraphs it will not collapsed and not to allow save if you does not fill the required filed. Don't make only content type filed required, you should make the paragraph type fields required as your requirements.
If you will click on collapse without filling values in required filed it will throw errors and will not collapsed until you fill values in required fields.
Please check the attachment.
Comment #4
supriya1992 commentedComment #5
supriya1992 commentedComment #6
WebbehThis issue is a duplicate of https://www.drupal.org/project/paragraphs/issues/2612120 , closing pending any separate thoughts on the matter.
Comment #7
nikolaatWebbeh the issue you mentioned is for D7. We are D8.
Comment #8
WebbehOh lord, good eyes NikolaAt. Apologies!
Linked the D7 version of this issue as a related issue so hopefully they can be paired together.
Comment #9
nikolaatComment #10
supriya1992 commentedComment #11
WebbehNikolaAt, can you provide more information on the configuration that allowed this functionality to happen?
I'm trying to reproduce and confirm this bug using the latest Paragraphs release (using either the Experimental or Classic form display modes), but I am currently unable to recreate the first paragraph entity being collapsed when creating the second entity on the Classic form display mode.
However, each of the configurations I'm working with give me correct functionality, where the empty Paragraph entity is being flagged on Save.
Comment #12
WebbehActually, scratch that: following https://www.drupal.org/project/paragraphs/issues/3041810 , I was able to reproduce this issue, although your comment on that issue appears to mirror the original issue (and mirrors the original post in this issue).
Closing this in lieu of the older, more detailed issue handling this bug, unless there's some justification for this issue to remain open.