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 (cli) (built: Jan 19 2009 02:02:56)

I checked the watchdog table in the database:

Changed owner of @type %title to uid %name.

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";

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));
#11 403034-11_D6.patch995 bytesroderik
#8 403034-node_assign_owner_action-type.patch982 bytesDamien Tournoud
PASSED: [[SimpleTest]]: [MySQL] 24,822 pass(es). View
#4 403034_D6.patch571 bytesroderik
#2 403034.patch771 bytesroderik
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 403034.patch. View
Members fund testing for the Drupal project. Drupal Association Learn more


samuelet’s picture

Version: 6.10 » 6.14

I 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.

roderik’s picture

Version: 6.14 » 6.17
Status: Active » Reviewed & tested by the community
771 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 403034.patch. View

- 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.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 403034.patch, failed testing.

roderik’s picture

Status: Needs work » Needs review
571 bytes

Meh, test bot. I am so a non-core hacker...

Hope this is better. ('cvs diff' format, too.)

kndr’s picture

Version: 6.17 » 6.19
Priority: Normal » Critical

Confirm this. In my environment (Pressflow 6.19.92) this bug breaks the site. I've got WSOD and error:

"The website encountered an unexpected error. Please try again later."

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:

Recoverable fatal error: Object of class stdClass could not be converted to string in devel_watchdog() (line 430 of /public_html/sites/all/modules/devel/devel.module).

Patch #2 is correct - exactly the same works for me in 6.19 and Pressflow 6.19.92 installation. Commit, please, this simple patch.

roderik’s picture

Status: Needs review » Reviewed & tested by the community

So 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*

Damien Tournoud’s picture

Title: node.module provokes segmentation fault in log » node_assign_owner_action() logs an object type instead of the type name
Version: 6.19 » 7.x-dev
Priority: Critical » Normal
Status: Reviewed & tested by the community » Patch (to be ported)

This in D7 first, then backport.

Damien Tournoud’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
982 bytes
PASSED: [[SimpleTest]]: [MySQL] 24,822 pass(es). View

Ported to #4 to Drupal 7. Don't credit me.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks.

Damien Tournoud’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Patch (to be ported)

Back to D6.

@Roderik, could you roll a proper patch based on your #4? See http://drupal.org/patch/create for instructions.

roderik’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
995 bytes

Dang, apparently forgot the '-up' flags in #4. Guess I panicked from having the test bot growl at me.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Simple and straightforward patch. Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.