I have a log entry "Changed owner of Test to uid ...", if I click on it I get a blank screen.
Apache log says:
[Mon Mar 16 02:04:21 2009] [notice] child pid 26171 exit signal Segmentation fault (11)
Hu ? Just for the record:
PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: Jan 19 2009 02:02:56)
I checked the watchdog table in the database:
Message:
Changed owner of @type %title to uid %name.
Variables:
a:3:{s:5:"@type";O:8:"stdClass":14:{s:4:"type";s:4:"book";s:4:"name";s:9:"Book page";s:6:"module";s:4:"node";s:11:"description";s:283:"A book page is a page of content, organized into a
collection of related entries collectively known as a book. A book page automatically displays links to adjacent pages, providing a simple navigation system for organizing and
reviewing structured content.";s:4:"help";s:0:"";s:9:"has_title";s:1:"1";s:11:"title_label";s:5:"Title";s:8:"has_body";s:1:"1";s:10:"body_label";
s:4:"Body";s:14:"min_word_count";s:1:"0";s:6:"custom";s:1:"1";s:8:"modified";s:1:"1";s:6:"locked";s:1:"0";s:9:"orig_type";s:4:"book";}s:6:"%title";s:4:"Test";s:5:"%name";s:9:"anewowner";}
The error lies in node.module:
/**
* Implementation of a configurable Drupal action.
* Assigns ownership of a node to a user.
*/
function node_assign_owner_action(&$node, $context) {
$node->uid = $context['owner_uid'];
$owner_name = db_result(db_query("SELECT name FROM {users} WHERE uid = %d", $context['owner_uid']));
watchdog('action', 'Changed owner of @type %title to uid %name.', array('@type' => node_get_types('type', $node), '%title' => $node->title, '%name' => $owner_name));
}
node_get_types should be called with 'name' not 'type.
watchdog('action', 'Changed owner of @type %title to uid %name.', array('@type' => node_get_types('name', $node), '%title' => $node->title, '%name' => $owner_name));
Comment | File | Size | Author |
---|---|---|---|
#11 | 403034-11_D6.patch | 995 bytes | roderik |
#8 | 403034-node_assign_owner_action-type.patch | 982 bytes | Damien Tournoud |
#4 | 403034_D6.patch | 571 bytes | roderik |
#2 | 403034.patch | 771 bytes | roderik |
Comments
Comment #1
samuelet CreditAttribution: samuelet commentedI confirm this bug also on 6.14.
This bug is related to #365298: Core "Change the author of a post" action not firing for assigned triggers where you can find the instructions to reproduce it.
Comment #2
roderik- bug encountered & traced independently
- this issue found and confirmed
- solution tested.
And it really is a 'typo' kind of thing, since all 'neighbor' functions use node_get_types('name', $node).
In the interest of not having this wait another 9 months... can I please act as if Andreas Wolf or nonsie (in duplicate issue) set the issue to 'needs review'? And I am setting it RTBC now?
Please? :)
Note: this is not a "fix in D7 first" case, since node_get_types() has died off.
Marking #460852: Minor change in node_assign_owner_action required duplicate.
Comment #4
roderikMeh, test bot. I am so a non-core hacker...
Hope this is better. ('cvs diff' format, too.)
Comment #5
kndrConfirm this. In my environment (Pressflow 6.19.92) this bug breaks the site. I've got WSOD and error:
after trying to execute VBO action "Change the author of the post". It is broken since Devel module try to execute devel_watchdog() function with wrong parameters:
Patch #2 is correct - exactly the same works for me in 6.19 and Pressflow 6.19.92 installation. Commit, please, this simple patch.
Comment #6
roderikSo like, "in the interest of not having this wait for another 9 months"...
*changes status again, and quickly ducks & hides, hoping nothing will explode this time*
Comment #7
Damien Tournoud CreditAttribution: Damien Tournoud commentedThis in D7 first, then backport.
Comment #8
Damien Tournoud CreditAttribution: Damien Tournoud commentedPorted to #4 to Drupal 7. Don't credit me.
Comment #9
Dries CreditAttribution: Dries commentedCommitted. Thanks.
Comment #10
Damien Tournoud CreditAttribution: Damien Tournoud commentedBack to D6.
@Roderik, could you roll a proper patch based on your #4? See http://drupal.org/patch/create for instructions.
Comment #11
roderikDang, apparently forgot the '-up' flags in #4. Guess I panicked from having the test bot growl at me.
Comment #12
Gábor HojtsySimple and straightforward patch. Committed, thanks.