Another module's cron process sets most (!) usernode comments back to 0 (disabled)

MarcoR - November 2, 2007 - 10:09
Project:Usernode Guestbook
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:MarcoR
Status:closed
Description

When all existing usernodes have been updated by usernode_comment.module to readable and writable comments (node->comment=2), the cron process sets most usernodes back to 0.

EXCEPT: There are unchanged usernodes in node table for:
- Admin (uid 1),
- wrong users with uid 0 (and therefore having no entry in users table) and
- an deleted user who still has a usernode but no entry in users table (uid 77).

I commented out cron hook in usernode module, but that made no change to that effect. So which module has a cron process that changes the comment values in usernodes?

#1

MarcoR - November 3, 2007 - 13:08
Assigned to:Anonymous» MarcoR

Additionally subscriptions module sends out usernode notifications each time a user object is saved. Very annoying, but gives a hint of whats going wrong here.

#2

MarcoR - November 3, 2007 - 13:27
Status:active» patch (to be ported)

Each time the cron process is run and another module tries to save some data to the users table, this code is run:

<?php
     
case 'update':
       
// Save usernode options and delete values from form array
        // before usernode gets saved
       
$node = usernode_get_node(&$user);
       
$node->comment = $edit['comment'];
       
node_save($node);
        unset(
$edit['comment']);
?>

It was intended tp run this code only on send of the form. Operation must be 'submit' instead of 'update'.

<?php
     
case 'submit':
       
// Save usernode options and delete values from form array
        // before usernode gets saved
       
$node = usernode_get_node(&$user);
       
$node->comment = $edit['comment'];
       
node_save($node);
        unset(
$edit['comment']);
?>

Will be fixed in the next 5.x-dev-version.

#3

MarcoR - November 4, 2007 - 20:54
Status:patch (to be ported)» fixed

Fixed in current development snapshot.

#4

Anonymous - November 18, 2007 - 21:01
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.