Add an operation parameter for hook_usage_block_tracking

Created on 15 November 2022, about 2 years ago
Updated 26 April 2024, 8 months ago

Problem/Motivation

We have a view listing the entities added or deleted using inline entity form in a specific entity. Currently due to the tracking of revisions, it doesn't reflect the results correctly. So we tried to use hook_usage_block_tracking to switch off tracking revisions. Since it doesn't have any parameters based on which scenario we need to block, ie. on saving the entity (Add operation), on removing the entity (Delete operation), the hook executes on both scenarios. It would be easier if we get that operation as a parameter, so we can set a condition based on the incoming value.

Steps to reproduce

1. Add an inline entity form for an entity.
2. Save multiple entities inside the node.
3. Have a view for listing those entities using entity_usage counts.
4. Delete any entity inside the node. It will not reflect in the listing.

Proposed resolution

Add an 'op' parameter for the hook_usage_block_tracking to know the operation.

Feature request
Status

Needs review

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024