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

presleyd’s picture

Assigned: Unassigned » presleyd
Status: Active » Needs review

This 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.

presleyd’s picture

Assigned: presleyd » Unassigned
Status: Needs review » Active

No this is wrong. This dodges the WSOD but it doesn't load the fields properly. Bah, so much for an easy typo fix.

jpetso’s picture

Yah, 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.

amogiz’s picture

I 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

jpetso’s picture

I 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.

ndm’s picture

I've tested the beta2. For me the problem is identical. I must clear the cache for each operation when i work with transformation_drupal

ndm’s picture

I 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);

Radiating Gnome’s picture

I'm having the same error, repeatedly. Any progress?

rzelnik’s picture

Subscribe - I receive the same error on my local Drupal installation (PHP Version 5.2.6).

Radiating Gnome’s picture

Here'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.

jpetso’s picture

@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.

bealdav’s picture

You'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.