Problem: ctools_entity_from_field_context() invokes entity access callbacks directly in a hacky way. It does not pass the required $entity_type parameter and therefore causes PHP warnings.

Solution: use entity_access() instead and pass along the entity type.

CommentFileSizeAuthor
#1 ctools-entity-access-2204889-1.patch1.13 KBklausi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klausi’s picture

Status: Active » Needs review
FileSize
1.13 KB

Patch attached. Unfortunately I had to combine it with the patch from #2195471: Only variables should be passed by reference in ctools_entity_from_field_context, because the 2 changes are so close together.

japerry’s picture

Status: Needs review » Closed (duplicate)

Ctools does not depend on the entity module. Therefore this patch won't work. However, good news -- we have it rolled in for #2195211: Warning after update: Missing argument 4 for entity_metadata_taxonomy_access

Marking as a duplicate.