When I am trying to rebuild sitemap I get the following error:
ResponseText: The website encountered an unexpected error. Please try again later. RuntimeException: Host entity for field collection item (39) was not set. in Drupal\field_collection\FieldCollectionItemAccessControlHandler->checkAccess() (line 26 of modules/contrib/field_collection/src/FieldCollectionItemAccessControlHandler.php). Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'view', Object, ) (Line: 631)
During the investigation, I created a view called "Field Collections (Field Collection Item) " (attaching) and then I tried to see a page with field collection ID 39 I got the error:
The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">RuntimeException</em>: Host entity for field collection item (39) was not set.
I tried open as /field_collection_item/39 and get the following error:
The website encountered an unexpected error. Please try again later.
Error: Call to a member function access() on null in Drupal\field_collection\Access\FieldCollectionItemHostOperationCheck->access() (line 30 of modules/contrib/field_collection/src/Access/FieldCollectionItemHostOperationCheck.php).
I checked the node what using this Field Collection ID 39 and found this Field Collection Item was deleted.
So steps to reproduce:
Create a node with Field Collection or few.
Edit this node and delete one item.
Run rebuilding of sitemap or just try to open using following path /field_collection_item/39.
Thank you.
The screen of my view:
Comment | File | Size | Author |
---|---|---|---|
views.view_.field_collections.yml.txt | 10.48 KB | Ruslan Piskarov | |
fc1.png | 89.49 KB | Ruslan Piskarov |
Comments
Comment #2
Ruslan PiskarovComment #3
Ruslan PiskarovComment #4
Ruslan PiskarovComment #5
Ruslan PiskarovComment #6
lucmulder29 CreditAttribution: lucmulder29 commentedHi RuslanP,
I am fasing a similar issue. I was wondering if you have been able to resolve your problem, and if so, how you did that.
Thanks in advance,
Luc
Comment #7
Ruslan PiskarovHi lucmulder29,
For sites with Field collection instead of xmlsitemap module, for now, I am using simple_sitemap.
And for all new projects, I use Paragraph instead of Field collection and xmlsitemap.
Comment #8
ram4nd CreditAttribution: ram4nd as a volunteer commented