Hi there,

its possible to use fieldcollection in paragraphs and everything works fine.

but when i create a paragraph field in field collections and try to use the field i get this error massage:

Error: Call to a member function access() on null in Drupal\field_collection\FieldCollectionItemAccessControlHandler->checkAccess() (Zeile 38 in /srv/www/drupal8x/docs/modules/field_collection/src/FieldCollectionItemAccessControlHandler.php) #0 /srv/www/drupal8x/docs/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php(105): Drupal\field_collection\FieldCollectionItemAccessControlHandler->checkAccess(Object(Drupal\field_collection\Entity\FieldCollectionItem), 'view', Object(Drupal\Core\Session\AccountProxy)) #1 /srv/www/drupal8x/docs/core/lib/Drupal/Core/Entity/ContentEntityBase.php(631): Drupal\Core\Entity\EntityAccessControlHandler->access(Object(Drupal\field_collection\Entity\FieldCollectionItem), 'view', Object(Drupal\Core\Session\AccountProxy), true) #2 /srv/www/drupal8x/docs/modules/paragraphs/src/ParagraphAccessControlHandler.php(30)...... and so on.

Is there a way to use paragraphs in fieldcollections?

Best Regards
Franz

Comments

fhe_sol created an issue. See original summary.

fhe_sol’s picture

Component: Miscellaneous » Code
Priyanka.addweb’s picture

Can you please provide step to reproduce this issue.

As I follow step like:

1) Create paragraph type.
2) Create field collection.
3) Use paragraph field in field collection.
4) Use field collection in content type.
5) Add data to that content type.

This steps are working properly for me.

emb03’s picture

I am getting this error too. It error occurs when you go back to edit the content type (not when you first add the data). Please patch ASAP.

The website encountered an unexpected error. Please try again later.
Error: Call to a member function access() on null in Drupal\field_collection\FieldCollectionItemAccessControlHandler->checkAccess() (line 38 of modules\contribution\field_collection\src\FieldCollectionItemAccessControlHandler.php).
renatog’s picture

Assigned: Unassigned » renatog

  • RenatoG committed 8fbe185 on 8.x-3.x
    Issue #2924034 by fhe_sol, Mansi.AddWeb, RenatoG, emb03: Paragraphs in...
renatog’s picture

Assigned: renatog » Unassigned
Status: Active » Fixed

Fixed.

Committed to the dev branch.

Best,

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

resinka’s picture

Hi. Wondering if you could help me out with this.
I am kind of stuck, couldn't find any solution right here.

I have a field in the Content type that uses Field Collection. (field_brand_collection)
That field Collection has two fields:
1. To choose node from another content type (field_brand) entity reference
2. Paragraph field (field_brand_paragraph)
2.1. In the paragraph i have one field Header.(field_header) I want when selecting the field Header, to take the NID from the first field collection, and to render some fields from the choosen node.

Can anyone help me out with this?
Thank you