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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

garnett2125 created an issue. See original summary.

garnett2125’s picture

garnett2125’s picture

As I have this issue on the 8.x-1.1 version i'm also proposing a patch for this one.

miro_dietiker’s picture

Status: Active » Needs review

We 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?

kristofferwiklund’s picture

Status: Needs review » Postponed (maintainer needs more info)

I have tried to reproduce this. I can not reproduce.

Could you garnett2125 try if this is still a problem with latest core and paragraphs?

garnett2125’s picture

Hi 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.