Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I'm getting this errors after I fix the #1027140: Problem with two or more Imagefields with default image: node seems to have default images uploaded using my own workaround.
It happens when I fill anyone from the Link fields. Since I was suspecting Filepath because of previos issue and some other indices I placed the following code into the filefield_paths_node_update():
function filefield_paths_node_update(&$node) {
if (($ffp = filefield_paths_get_fields($node)) !== FALSE) {
...
foreach ($ffp['#files'] as &$file) {
// Invoke hook_filefield_paths_process_file().
foreach (module_implements('filefield_paths_process_file') as $module) {
$function = $module . '_filefield_paths_process_file';
$function(($file['new'] || variable_get("ffp_{$node->type}_{$file['name']}", 0)), $file, $ffp['#settings'][$file['name']], $node, $update);
dvm($node->field_link_linkedin[0]['attributes'], $function); // <------------- DEBUG
}
}
And I got:
•filefield_paths_filefield_paths_process_file => string(6) "a:0:{}"
•imagefield_filefield_paths_process_file => string(6) "a:0:{}"
•imagefield_crop_filefield_paths_process_file => string(6) "a:0:{}"
•filefield_paths_filefield_paths_process_file => array(2) {
["target"]=>
string(6) "_blank"
["class"]=>
string(13) "link-linkedin"
}
•imagefield_filefield_paths_process_file => array(2) {
["target"]=>
string(6) "_blank"
["class"]=>
string(13) "link-linkedin"
}
etc...
So the node object is changed in the filefield_paths_filefield_paths_process_file() since $node is passed by the reference.
Comments
Comment #1
Alex Andrascu CreditAttribution: Alex Andrascu commentedI've just spent my last hours trying to track this issue. Can confirm it on FileField Paths 6.x-1.4 aswell.
This is more then critical as it breaks the entire node object with catastrophic consequences. On my installation for example it broke the input filters hence inserting unescaped html in node_revisions table field teaser.
Comment #2
Alex Andrascu CreditAttribution: Alex Andrascu commentedComment #3
markus_petrux CreditAttribution: markus_petrux commentedIt seems to me the problem is caused by
filefield_paths_node_update()
, when it invokes_content_field_invoke_default('update', $node)
and there is a Link field in the node. Link fields have a text column that's aimed to hold an array of attributes, Link module serializes this array during nodeapi('presave'), but this is not invoked by filefield_paths.Comment #4
Deciphered CreditAttribution: Deciphered commentedNo longer supporting Drupal 6 issues for this module.