Hook "moderated_content_bulk_publish_verify_publish" doesn't work

Created on 19 June 2024, 5 months ago
Updated 12 July 2024, 4 months ago

Problem/Motivation

Hi,

I see that the hook "moderated_content_bulk_publish_verify_publish" works only if the entity contains a "body" field, but
I don't see any reason for restricting this hook only to the "body" field.

Steps to reproduce

1. Install either 3.x or 2.x version of the module.
2. Enable the "Publish latest revision" action for admin/content view under VBO operations.
3. Implement "hook_moderated_content_bulk_publish_verify_publish" in custom module.
4. Run "Publish latest revision" action for an entity without "body" field
5. You will find that hook doesn't invoke.

Proposed resolution

Remove the dependency of the body field on calling the hook.

Also it will be good to pass additional data like langcode, bundle to hook object

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇮🇳India gaurav_manerkar Vasco Da Gama, Goa

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024