I'm getting the following message after enabling Simplenews, simplenews access, simplenews action and drupal core actions modules within Drupal 7 alpha 5

Notice: Undefined index: label in actions_synchronize() (line 292 of /var/www/glasvezel.biz/public_html/includes/actions.inc).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'label' cannot be null: INSERT INTO {actions} (aid, type, callback, parameters, label) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => simplenews_cron_action [:db_insert_placeholder_1] => simplenews [:db_insert_placeholder_2] => simplenews_cron_action [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => ) in actions_synchronize() (line 294 of /var/www/glasvezel.biz/public_html/includes/actions.inc).
The website encountered an unexpected error. Please try again later.

Please let me know if you need more information or testing.

CommentFileSizeAuthor
#3 809276.patch2.32 KBsimon georges

Comments

simon georges’s picture

simon georges’s picture

Closing #962906: error message during module install as a duplicate of this one.

simon georges’s picture

Status: Active » Needs review
StatusFileSize
new2.32 KB

Ok, I've finally understood, thanks to the documentation at Converting 6.x modules to 7.x :

Trigger and Actions API overhaul : #525540: trigger.module and includes/actions.inc need overhaul
The Trigger and Actions APIs were changed extensively between Drupal 6 and Drupal 7, to simplify the API and make it more consistent. The following changes were made:
1. Database table {actions} changed - 'description' field is now called 'label'.
2. Database table {trigger_assignments} changed - 'op' field was removed, and the 'hook' field now contains the full function name. For instance, in Drupal 6 you might have had hook/op of node/insert, and in Drupal 7, the hook field would be node_insert.
3. The arrays returned by hook_action_info(), hook_action_info_alter(), actions_list(), actions_get_all_actions(), actions_actions_map() were changed:
* 'description' element becomes 'label'
* 'hooks' element becomes 'triggers', and is now a flat array of trigger functions rather than a nested array of type/operation.

Anyway, patch provided, it seems to work for me (at least the declarations of actions).

miro_dietiker’s picture

Status: Needs review » Fixed

Committed this as a first step.
Please check that/if it works (since i didn't).

Followup is
#964614: Replacement of hook_hook_info() by hook_trigger_info()

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.