Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
system.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Dec 2010 at 17:01 UTC
Updated:
1 Sep 2014 at 13:51 UTC
Jump to comment: Most recent
Comments
Comment #1
damien tournoud commentedWe already have tests for those actions. They can easily be expanded, but I will be happy if they still pass.
Comment #2
damien tournoud commentedLet's get this in.
Comment #3
webchickHm. Are you sure this is right? node_publish_action() and node_unpublish_action() do not do node_load() and node_save().
Comment #4
catchLooks like the entire thing is broken now I've seen those:
1. comment_actions_info() defines presave, insert and update as hooks. All of these get $comment as an object, but only pre_save can affect the comment before it gets saved to the database, so the else {. So I don't see how the insert or update hooks could ever possibly work, and the tests added in #974072: Comment publish / unpublish actions are broken only test the actual logic in the action, not in context of comment saving, so wouldn't catch this.
2. node_actions_info() defines presave, comment_insert and comment_update. But all the node actions only set $node->status and don't save the node, so this could never actually take effect.
Comment #5
catchReading through this mess is sapping my will to live, so I'm re-titling and unassigning myself. As far as I can see this is equally broken in Drupal 6.
Comment #6
webchickSigh.
Comment #7
webchickOops.
Comment #8
catch#244093: Node and comment actions are (still) completely broken and have broken tests too was duplicate.
Comment #9
klonos...yes, but none of the issues is actually marked as such.
Comment #10
Taxoman commentedSubscribing.
Comment #11
catchThis is the duplicate, issue status fail :(
See you over at #244093: Node and comment actions are (still) completely broken and have broken tests too.