Warning - Token - Identified problems
The following wildcard or placeholder types are not defined as arrays:
$info['tokens']['basic_cart_order']['products']
The following token types are not defined but have placeholders:
$info['types']['basic_cart_order']

Comments

MRJWO’s picture

I get this same thing.

Hetta’s picture

It's possible that this is the php 5.4+ array bug. If so, it's easy to fix:
http://drupal.stackexchange.com/questions/68551/array-to-string-conversi...
"So, fix is to replace array_diff_assoc (not recursive) with drupal_array_diff_assoc_recursive (recursive, as it comes from its name)"

alex dicianu’s picture

Patch applied on 7.x-3.x branch.

thamas’s picture

Issue summary: View changes

Half of the solution (and the patch applied to dev version) can be found in #2194715: Incorrect hook_token_info implementation in basic_cart_order module.

But even the actual dev version of the module is still missing the token type definition. The full correct implementation should look something like this.
(See the example module: http://cgit.drupalcode.org/examples/tree/token_example/token_example.tok...)

<?php

/**
 * Implements hook_token_info().
 */
function basic_cart_order_token_info() {
  $info = array();
  // Add any new tokens.
  $info['types']['basic_cart_order'] = array(
    'name' => t('Basic cart order.'),
    'description' => t('Tokens related to Basic cart order.'),
  );
  $info['tokens']['basic_cart_order']['products'] = array(
    'name' => t('Product listing.'),
    'description' => t('Listing of ordered products.'),
  );
  // Return them.
  return $info;
}

?>
drupal_lib’s picture

I am trying to use this module (Version: 7.x-3.0) for a short-term project and am also getting the status page warning. Is there a fix for this? Thanks so much.

drupal_lib’s picture

I am experiencing this same issue - has anyone found a fix? The module is working as expected but I have the "Tokens or token types not defined as arrays $info['tokens']['basic_cart_order']['products']" error on the Status Report page (Drupal version 7.78).

avpaderno’s picture

Version: 7.x-3.0 » 7.x-3.x-dev
norman.lol’s picture

Status: Active » Closed (outdated)

7.x-* unsupported

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.