Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Whenever I try to add an operation "Set fields in node object", I get a WSOD immediately upon hitting next. The error in my logs is:
PHP Fatal error: Function name must be a string in <path to my modules>/transformations_drupal/transformations/operations.node.inc on line 47
Line 47 is the return $function($nodeField, $propertyKey); in the chunk of code below:
public static function nodeFieldInfo($nodeField, $propertyKey) {
switch ($propertyKey) {
case 'label':
return $nodeField['label'];
default:
$function = fieldtool_get_function(
$nodeField, 'transformations slot property callback'
);
return $function($nodeField, $propertyKey);
}
}
I am using PHP 5.2
Comments
Comment #1
presleyd CreditAttribution: presleyd commentedThis can be fixed by changing line 47 to read:
return $function;
I've found another bug if I can figure it out I'll roll up a patch.
Comment #2
presleyd CreditAttribution: presleyd commentedNo this is wrong. This dodges the WSOD but it doesn't load the fields properly. Bah, so much for an easy typo fix.
Comment #3
jpetso CreditAttribution: jpetso commentedYah, sorry. I've had this error before, it means that the operation provides a field (in ::inputs() or ::outputs()) but doesn't find the corresponding info when being queried for the actual info (like data type, and stuff) which means it throws an exception. I thought I had fixed this issue, and in fact the fields in inputs() and outputs() should be at least as strict with fields as the info function that you pasted.
So I'm not sure why that might be - perhaps you've got an outdated cache for any reason, and things resolve after you clear the caches in admin/settings/performance? No idea.
Comment #4
amogiz CreditAttribution: amogiz commentedI got exactly the same problem : tried to clear cache but nothing.
Please, could you find any solution, i Really need to use this great module !
Thanx
Comment #5
jpetso CreditAttribution: jpetso commentedI just released Field Tool 6.x-1.0-beta2 featuring with a single cache-clearing bugfix, but if you already cleared the cache then this might not solve your issue. Please try it anyways, modify/save some fields, and report back.
Comment #6
ndm CreditAttribution: ndm commentedI've tested the beta2. For me the problem is identical. I must clear the cache for each operation when i work with transformation_drupal
Comment #7
ndm CreditAttribution: ndm commentedI have added this and now i must reload the page not clear manually the cache. By moment i have the good page, by moment i must push f5 key.
//ligne 237 in fieldtool/fieldtool.module
function fieldtool_get_function($field_info, $function_name) {
_fieldtool_ctools_include_plugins();
fieldtool_cache_invalidate(); /////add this
return ctools_plugin_get_function($field_info, $function_name);
Comment #8
Radiating Gnome CreditAttribution: Radiating Gnome commentedI'm having the same error, repeatedly. Any progress?
Comment #9
rzelnik CreditAttribution: rzelnik commentedSubscribe - I receive the same error on my local Drupal installation (PHP Version 5.2.6).
Comment #10
Radiating Gnome CreditAttribution: Radiating Gnome commentedHere's a question for the maintainers: I have a pressing, serious business need for this functionality, and might be able to pay for it's completion. Contact me through my contact form to talk about this in more detail.
Comment #11
jpetso CreditAttribution: jpetso commented@Radiating Gnome: unfortunately (?) I have less time than monetary needs, so I'm not for hire. I'll gladly accept patches that other developers contribute, if they solve the problem properly.
@all: sorry guys, I don't have a clue and probably won't have for a while, as the module is not in very active development at the moment. I hope for other developers to contribute, but most likely won't be doing a lot of maintenance by myself anymore.
Comment #12
bealdav CreditAttribution: bealdav commentedYou've got perform a very good job.
Your work seems to be very promising a lot but ...
I have the same bug
PHP Fatal error: Function name must be a string in
/transformations_drupal/transformations/operations.node.inc on line 47
Very really damage.