Hi,
I created a field Entity reference revision on a node type to reference paragraph of type "Products".
For that paragraph "Products" I created a field to reference paragraph of type "Product" (singular).
When i'm on the node page (front), i'm seeing the paragraph "Products" because it also have a Title field, but i'm not seeing the nested "Product". And that issue appear only when anonymous. When logged in everything's fine.
After digging into the code I found out that when the ParagraphAccessControlHandler::checkAccess function look for parent entity access, and this one could return an AccessResultNeutral.
It causes the EntityReferenceFormatterBase::getEntitiesToView function to not add the paragraph entity in the array of entities to view. In fact, it checks $access->isAllowed() and Neutral doesn't mean Allowed.
Not 100% sure that it is the right way to fix the issue but if not I would like to have a feedback on that issue. Patch is coming
Thanks
Comment | File | Size | Author |
---|---|---|---|
#3 | nested-paragraph-access-2888844-3-do-not-test.patch | 1.63 KB | garnett2125 |
#2 | nested-paragraph-access-2888844-2.patch | 1.08 KB | garnett2125 |
|
Comments
Comment #2
garnett2125 CreditAttribution: garnett2125 commentedComment #3
garnett2125 CreditAttribution: garnett2125 commentedAs I have this issue on the 8.x-1.1 version i'm also proposing a patch for this one.
Comment #4
miro_dietikerWe have tons of tests that proof that our Paragraphs display fine.
It seems this results from a custom setup.
You will need to describe exactly what triggered this setup. Even better would be a test that proofs the bug.
Setting to needs-review to trigger the testbot, i wonder if it breaks some expectation?
Comment #5
kristofferwiklund CreditAttribution: kristofferwiklund at Websystem commentedI have tried to reproduce this. I can not reproduce.
Could you garnett2125 try if this is still a problem with latest core and paragraphs?
Comment #6
garnett2125 CreditAttribution: garnett2125 commentedHi kristofferwiklund,
Tests are in progress on my project where I found the issue, i'll keep this issue updated if we still repoduce it or not.
Thanks.