As shown in the screenshots, I have a field called CTA Paragraph in my brick that references to a paragraph I had created(reusable paragraph used in other bricks too). Now while editing the brick if I click on Save & keep Published directly then the paragraph & all the other fields get saved correctly.
But if I click on Update Brick and then click on Save & keep Published it removes all values present in the Paragraph field.
NOTE: I added the patch from Prevent undefined index in bricks_preprocess_paragraph() it removed this notice but only saves partially.
Test Case 1: If no nothing is changed in the paragraph field the value remains even after clicking update brick & then save. (Works)
Test Case 2: If the added paragraph has multiple fields within it like my case(attached Screen Shot 2017-05-24 at 4.08.50 PM.png) then after adding this patch only the field which was changed within the paragraph is saved all the other fields in the paragraph becomes blank. Eg: Say my paragraph has 3 fields and I edited field_1 then field_1 is saved but field_2 & field_3 which had value initially gets empty. (Fails)
I am new to drupal (less than 2 months) therefore any suggestion or solution would be appreciated.
Comment | File | Size | Author |
---|---|---|---|
#4 | Screen Shot 2017-05-24 at 4.08.50 PM.png | 60.12 KB | chris64uz |
Screen Shot 2017-05-24 at 3.38.07 PM.png | 94.55 KB | chris64uz | |
Screen Shot 2017-05-24 at 3.36.47 PM.png | 106.56 KB | chris64uz | |
Screen Shot 2017-05-24 at 3.39.07 PM.png | 13.26 KB | chris64uz |
Comments
Comment #2
chris64uz CreditAttribution: chris64uz commentedComment #3
chris64uz CreditAttribution: chris64uz commentedComment #4
chris64uz CreditAttribution: chris64uz commentedComment #5
chris64uz CreditAttribution: chris64uz commentedComment #6
anydigital CreditAttribution: anydigital as a volunteer and at Highweb commentedThanks Christopher for reporting.
It looks like the initial issue is from #2367235: Support entity revision references. Please try the patch from #2367235-92: Support entity revision references and let me know if it helps.
Comment #7
anydigital CreditAttribution: anydigital as a volunteer and at Highweb commentedComment #8
chris64uz CreditAttribution: chris64uz commentedI tried the #2367235: Support entity revision references partially but it started breaking a few other things therefore I decided to abandon this approach in fear of delaying my project. Instead I found a workaround I created a Brick with the fields from Paragraph & took the Brick within Brick approach. This worked without any issues.
I am going to stick with this approach and avoid mixing Paragraphs & Bricks until bricks & paragraphs become compatible with each other in future.
Thanks @tonystar for the quick reply.
Comment #9
anydigital CreditAttribution: anydigital as a volunteer and at Highweb commentedComment #10
anydigital CreditAttribution: anydigital as a volunteer and at Highweb commentedUpdates from Slack: