Problem/Motivation
Trash can be enabled for the entity type Paragraph library item, the Paragraph library item can be moved to the trash, but then it cannot be restored or purged.
Multiple custom entities are embeddable and uses a custom but standardized method getParentEntity, like paragraph.
The access checks performed by Paragraph library item also checks that the user has the same access for the embedded paragraphs, this means that when Restore and Purge permission are checked against the Paragraph library item, then the same access is checked for the paragraph, which fail because the paragraph is not inside the trash.
Proposed resolution
Leverage the method getParentEntity to identify if the actual trashed content is the parent entity.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | paragraph-library-item-cannot-be-restored-or-purged-3562727-1.patch | 733 bytes | marco.pagliarulo |
Comments
Comment #2
marco.pagliarulo commentedComment #3
amateescu commentedI thought about this in the past few days, and my opinion is that it should be fixed in the Paragraphs Library module instead.
Unsurprisingly, I also found an issue which fixes it: #3340724: Paragraphs library not compatible with scheduled_transitions
Comment #5
marco.pagliarulo commentedThank you for reviewing it and found the other issue on paragraph