Closed (won't fix)
Project:
Drupal core
Version:
7.10
Component:
entity system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Apr 2012 at 10:19 UTC
Updated:
4 Mar 2013 at 19:55 UTC
In a custom module "mymodule" the following cron definition exists:
function mymodule_cron() {
$nodes = node_load_multiple(array(1712, 1740));
var_dump(array_keys($nodes));
var_dump($nodes[1712]->title);
var_dump($nodes[1740]->title);
}
When cron is run this is the current output:
array(2) {
[0]=> int(1712)
[1]=> int(1740)
}
string(52) "EXTRAVAGANTER SCHMUCK Anhänger besetzt mit Zirkonia"
string(52) "EXTRAVAGANTER SCHMUCK Anhänger besetzt mit Zirkonia"
This is wrong, because the query
SELECT `nid`, `vid`, `type`, `language`, `title`, `uid`, `status`, `created`, `changed`, `comment`, `promote`, `sticky`, `tnid`, `translate` FROM `node` WHERE nid in (1740, 1712);
returns:
nid,vid,type,language,title,uid,status,created,changed,comment,promote,sticky,tnid,translate
1712,1712,video,de,JENNY`S Herzanhänger mit Swarovski-Kristallen,1,1,1332800240,1332800240,2,1,0,0,0
1740,1740,video,de,EXTRAVAGANTER SCHMUCK Anhänger besetzt mit Zirkonia,1,1,1333404976,1333404976,2,1,0,0,0
so the title of node #1712 should have been "JENNY`S Herzanhänger mit Swarovski-Kristallen"
Output of var_dump($nodes) is attached.
PHP version:
PHP 5.3.3-7+squeeze8 with Suhosin-Patch (cli) (built: Feb 10 2012 13:05:56)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd., and
with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
Apache version:
Server version: Apache/2.2.16 (Debian)
Server built: Feb 5 2012 21:35:42
Debian Linux:
Linux version 2.6.32-5-amd64 (Debian 2.6.32-38) (ben@decadent.org.uk) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Mon Oct 3 03:59:20 UTC 2011
| Comment | File | Size | Author |
|---|---|---|---|
| Output of var_dump($nodes) | 13.18 KB | lstoetzel |
Comments
Comment #1
lstoetzel commentedBug also occurs using node_load:
Output:
Comment #2
damien tournoud commentedMost of this data is actually loaded from the
{node_revision}table. I guess your database is in a very inconsistent state.Comment #3
cweagansSupport requests are neither major nor critical.
Comment #4
dddave commentedper #2 and due to lack of response