Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Immediately following the upgrade from 7.x-2.2 to 7.x.2.3 I began to consistently get the following message when at /admin/config :
Notice: Undefined index: token type in rules_token_info() (line 1423 of /var/www/html/sites/all/modules/rules/rules.module).
The code in question looks like:
<?php
foreach ($types as $type) {
$token_type = $data_info[$type]['token type'];
...
?>
To silence the php error, I could easily do:
<?php
foreach ($types as $type) {
if (!isset($data_info[$type]['token type'])) continue;
$token_type = $data_info[$type]['token type'];
...
?>
However, I prefer to figure out why this is now happening and getting this properly fixed.
Comments
Comment #1
Ravenight CreditAttribution: Ravenight commentedI am having the same issue after updating myself.
Comment #2
sa3z CreditAttribution: sa3z commentedI'm having the same issue.
Comment #3
thekevinday CreditAttribution: thekevinday commentedAfter upgrading to ctools-7.x-1.3 and drupal 7.22, I no longer see the error messages.
Comment #4
ShaneOnABike CreditAttribution: ShaneOnABike commentedThis also happened to me but only once when I first used the rules it seems ok now. I am also using D-7.22 and CTools-7.x-1.3. I did a drush cc all as well just to make sure things were happy after the upgrade
Comment #5
moonray CreditAttribution: moonray commentedSame issue. Required clearing caches a few times before the notices went away.
This happened after upgrading Rules 7.x-2.3, CTools 7.x-1.3, and Token 7.x-1.5.
Drupal wasn't upgraded (yet); it's still on 7.19.
Comment #6
TR CreditAttribution: TR commented#3 (original poster), #4, and #5 all confirm that this goes away with CTools 7.x-1.3. Apparently this was a problem with the CTools token definitions, not Rules.