in inline.module:
function _inline_fileobj(&$node, $field_name, $image_name)
does not return the images included with the node.
Some debuging reveals that this has something to do with the language settings.
My site is in dutch ('nl'), but I did not define a node language ('und').
So
$node->{$field_name} gives array ( 'und' => array.....
But
$node->language gives 'nl'
so I think the foreach also has to search the 'und' language (the altered function works for me):
function _inline_fileobj(&$node, $field_name, $image_name) {
// Named file reference.
foreach ($node->{$field_name}[$node->language] as $file) {
// var_export($file);
// var_export($image_name);
$file = (object) $file;
if ($file->filename == $image_name) {
return $file;
}
}
foreach ($node->{$field_name}['und'] as $file) {
// var_export($file);
// var_export($image_name);
$file = (object) $file;
if ($file->filename == $image_name) {
return $file;
}
}
return NULL;
}
Comments
Comment #1
fasdalf@fasdalf.ru commentedSame for russian.
I'll try your fix and report back.
Comment #2
fasdalf@fasdalf.ru commentedShows (un)localized files without warnings, plase review:
2 functions changed, 1 function added.
Comment #3
fasdalf@fasdalf.ru commentedmisspostedComment #4
foxfabi commentedusing another language as default (disabling 'en') still results in ['und'] as key index ...
currently we are using: