- 🇺🇸United States douggreen Winchester, VA
Is this still needed after https://git.drupalcode.org/project/cps/-/commit/85e6127a461682bd2265cee5... ?
During publishing, other modules could want to hook into `hook_cps_changeset_published_before_transaction_end` or `hook_cps_changeset_published` and work on the changed entities, possibly even comparing them to the currently published entities.
Those hooks though happen too late and the `published_revision` of the entities can actually be the revisions which were just published (in real world scenarios this can actually change depending on when `$changeset->getChangedEntities();` is called for the first time, possibly resulting in fun random results).
This feature request is to avoid this uncertainty and always provide the correct "previous" revisions to any hook.
Use `hook_cps_changeset_published_before_transaction_end` to work on the entities `published_revision` and note that they can (or cannot) be the revisions which were just published.
Call `$changeset->getChangedEntities();` at the very beginning of the publishing process. This will cache the changed entities once for the entire process, with the "previous" published revisions.
Test the patch.
None.
None.
None.
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Is this still needed after https://git.drupalcode.org/project/cps/-/commit/85e6127a461682bd2265cee5... ?