I have a site based on Drupal 6.12.
From the beginning of my play with Macro module I experienced problems, an example:
I record changing fivestar Widget display from basic to default, the recorded code is at the end of this message.
When I want to execute it (import tab) I get the following errors:

* An illegal choice has been detected. Please contact the site administrator.
* The settings have not been saved because of the errors.

I have found the following: http://www.lullabot.com/articles/moving-cck-field-changes-from-dev-to-live but this doesn't solve the problem for me.
I don't fully understand why and when the patching described in the link above should be done and the difficulty of making this module capable of handle this problem internally.

Thanks in advance
WGbiker

$macro[0]['form_id'] = 'fivestar_settings';
$macro[0]['path'] = 'admin/settings/fivestar';
$macro[0]['values'] = array (
'fivestar_widget' => 'default',
'fivestar_color_widget' => '',
'fivestar_color_type' => 'default',
'scheme' => '',
'fivestar_colors' =>
array (
'on1' => '',
'on2' => '',
'hover1' => '',
'hover2' => '',
'off1' => '',
'off2' => '',
'matte' => '',
),
'op' => 'Save configuration',
'submit' => 'Save configuration',
'form_build_id' => 'form-b61eaa543079560a6ec5e99f4c59d189',
'form_token' => '3118510c7ed7355c490517e8cd03d6a3',
'form_id' => 'fivestar_settings',
);
$macro[0]['parameters'] = 'a:1:{i:0;a:3:{s:7:"storage";N;s:9:"submitted";b:0;s:4:"post";a:6:{s:15:"fivestar_widget";s:7:"default";s:4:"vote";s:1:"0";s:13:"form_build_id";s:37:"form-218df5ce655206b2e1f57956d1911ade";s:10:"form_token";s:32:"3118510c7ed7355c490517e8cd03d6a3";s:7:"form_id";s:17:"fivestar_settings";s:2:"op";s:18:"Save configuration";}}}';

$macro[1]['form_id'] = 'macro_admin_settings';
$macro[1]['path'] = 'admin/build/macro';
$macro[1]['values'] = array (
'macro_enabled' => 0,
'macro_delete' => 0,
);
$macro[1]['parameters'] = 'a:1:{i:0;a:3:{s:7:"storage";N;s:9:"submitted";b:0;s:4:"post";a:4:{s:2:"op";s:18:"Save configuration";s:13:"form_build_id";s:37:"form-c408e37ff92207426e12fdcdcd97f873";s:10:"form_token";s:32:"b12ded6ffa35ab5b7f98c9e40045752e";s:7:"form_id";s:20:"macro_admin_settings";}}}';

Comments

redpuma’s picture

I'm getting the same problem.

I noticed the Lullabot article is now 2 and half years old and the Macro module is not part of devel. I did the first hack to the macro.module file but not the second as I thought breaks the macro module completely.

Fatal error: Call to undefined function fivestar_color_form() in /var/www/drupal/sites/all/modules/fivestar/fivestar.module on line 485

Are these hacks necessary after this much time?

Is the macro module only useful for recording a limited number of forms not including CCK or Fivestar forms?