Problem / motivation

After upgrade Paragraphs to 7.x-1.0-rc4 or 7.x-1.0-rc4+1-dev, paragraphs used in Privatemsg module stops working and message "You are not allowed to add any of the bundles" appeared instead of list of Paragraph Bundles.

The problem persists even after the update Privatemsg module to the latest versions (1.x or 2.x).

Problem analysis

Function paragraphs_paragraphs_item_access() asks for entity_access(). If parent entity (privatemsg) has no 'access callback' defined, entity_access() returns NULL, because "If the entity type does not specify any access information, NULL is returned".

In that case, paragraphs_paragraphs_item_access() returns PARAGRAPHS_ITEM_ACCESS_DENY and function paragraphs_item_access() returns FALSE.

Proposed solutions

Variant A) Use patch for Paragraphs
Variant B) Define access callback in function privatemsg_entity_info() and return an appropriate privileges.

Comments

martin_klima created an issue. See original summary.

martin_klima’s picture

Issue summary: View changes
oadaeh’s picture

This might technically be a duplicate of one of these other existing issues:

The first one has a patch, but the patch doesn't currently include an access callback.

oadaeh’s picture

After attempting to use the CRUD functions as entity functions and realizing they don't work, I am amending my statement to exclude #1184984: Full public CRUD API as this issue being a duplicate of.
However, I do think it is a duplicate of #2081539: Re-write module to use Entity API.

ivnish’s picture

Status: Active » Closed (outdated)