Getting a validation error on Node update

hctom - June 19, 2007 - 10:57
Project:Advanced cache
Version:5.x-1.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi @all,

I just wanted to report that, when I try to update a cached node, I always get the validation error "This content has been modified by another user, changes cannot be saved." as long as I truncate the node_cache table before submitting.

The error gets thrown by the following statement in the node_validate() function:

if (isset($node->nid) && (node_last_changed($node->nid) > $node->changed)) {
    form_set_error('changed', t('This content has been modified by another user, changes cannot be saved.'));
}

The user trying to update the node has two roles: the authenticated user role and another one assigned through the RoleAssign module.

As soon as I comment out the patched line "$cache = cache_get($cache_id, 'cache_node');" in the patched node_load() function of the node.module everything works fine again.

I'd appreciate your help & thanx in advance

hctom

#1

ray007 - June 21, 2007 - 12:06

subscribing

#2

Satynos - September 21, 2007 - 17:02

Subscribing....

#3

firebus - December 5, 2007 - 01:02

so the steps to reproduce are:

1. go to node/123 (so that it gets cached)
2. truncate the cache_node table
3. go to node/123/edit
4. submit the edit form

or do you have to go to the edit page first before you truncate the cache_node table to make this happen?

#4

robertDouglass - July 18, 2008 - 22:08

can anyone confirm this for DRUPAL-5--1-6 or DRUPAL-5?

 
 

Drupal is a registered trademark of Dries Buytaert.