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

CommentFileSizeAuthor
Output of var_dump($nodes)13.18 KBlstoetzel

Comments

lstoetzel’s picture

Title: entity_load_multiple returns mashuped node data » node_load(_multiple) returns mashuped node data

Bug also occurs using node_load:

var_dump(node_load(1712, null, true)->title);
var_dump(node_load(1740, null, true)->title);

Output:

string(52) "EXTRAVAGANTER SCHMUCK Anhänger besetzt mit Zirkonia"
string(52) "EXTRAVAGANTER SCHMUCK Anhänger besetzt mit Zirkonia"
damien tournoud’s picture

Category: bug » support

Most of this data is actually loaded from the {node_revision} table. I guess your database is in a very inconsistent state.

cweagans’s picture

Priority: Major » Normal

Support requests are neither major nor critical.

dddave’s picture

Status: Active » Closed (won't fix)

per #2 and due to lack of response