I get this error much of the time when activating or deactivating modules, or clearing the cache.

WD php: PDOException: SQLSTATE[23000]: Integrity constraint          [error]
violation: 1048 Column 'type' 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] => nodequeue_action_add_node
    [:db_insert_placeholder_1] => 
    [:db_insert_placeholder_2] => nodequeue_action_add_node
    [:db_insert_placeholder_3] => 
    [:db_insert_placeholder_4] => Add node to nodequeue
)
 in actions_synchronize() (line 297 of
/media/psf/Home/Sites/(obfuscated)/includes/actions.inc).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'type' 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] => nodequeue_action_add_node
    [:db_insert_placeholder_1] => 
    [:db_insert_placeholder_2] => nodequeue_action_add_node
    [:db_insert_placeholder_3] => 
    [:db_insert_placeholder_4] => Add node to nodequeue
)
 in actions_synchronize() (line 297 of /media/psf/Home/Sites/(obfuscated)/includes/actions.inc).

Comments

SpaceGoat1701 created an issue.

jenlampton’s picture

Thanks for reporting this issue @SpaceGoat1701. I'm enabling and disabling modules and clearing the cache, but I can't seem to trigger the same error. Can you confirm you are on the latest 2.x-dev version of the module, and not an older one? If so, which modules are you enabling and disabling? Not sure that has anything to do with it but it would be good to confirm.

SpaceGoat1701’s picture

I don't recall the modules, although as I noted, it also happens when clearing the cache.

I'm using the latest dev (from August 19).

Carlitus’s picture

I'm having the same issue, when activating or deactivating modules and clearing cache, but not always.

@SpaceGoat1701 Have resolved it or have any clues?

bobodrone’s picture

EDIT: I can see, when running module_implements('action_info') that every second run there is a hook_implementation called "nodequeue_rules" which is not to be found ofcourse. I think that there is a mixup of the hooks here since rules has a similar named hook that nodequeue also implements:

- "hook_action_info" : "nodequeue_action_info"
- "hook_rules_action_info" : "nodequeue_rules_action_info"

wierd...

ORIGINAL:
I can confirm that this issue is happening. It happens on f.ex drush cc all BUT only every SECOND time for me. Every other there is NO error...

If I add type = * to the two declarations in the function nodequeue_rules_action_info it actually works. But I think the error is in rules somewhere... I´ll keep digging tomorrow.

/**
 * Implements hook_rules_action_info().
 */
function nodequeue_rules_action_info() {
  return array(
    // Action: Add a given node to the given nodequeue.
    'nodequeue_action_add_node' => array(
      'label' => t('Add node to nodequeue'),
      'group' => t('Nodequeue'),
      'type' => '*',
      'parameter' => array(
      ...
zread’s picture

I believe this is an issue for those of us running one of the patches from https://www.drupal.org/project/nodequeue/issues/1125922

Those patches create a submodule called nodequeue_rules which contains the hook "nodequeue_rules_rules_action_info()". This hook then enters into conflict with the hook "nodequeue_rules_action_info()" introduced by this commit: https://cgit.drupalcode.org/nodequeue/commit/?id=4fa38032ba6ef16ebd624ec...

There's a similar ticket here where a user points out a similar issue caused by a clash between two action info-related hooks, albeit for a different module: https://www.drupal.org/project/feeds/issues/1516494#comment-7242362

In this case, the solution would be to disable the submodule `nodequeue_rules` created by those patches (since I think everything was integrated), then upgrade the `nodequeue` module and then update any dependent modules & values in the db to leverage the new ones.