I get following white page error message after changing a users role
Fatal error: Call to undefined function token_get_values() in drupal7/sites/all/modules/role_change_notify/role_change_notify.module on line 227

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay’s picture

Priority: Major » Critical

Confirmed - A leftover from D6... that only happens if the D7 contrib token module is enabled. That must be why people were able to use this.

rfay’s picture

Title: error message after changing a users role » Fatal error: Call to undefined function token_get_values()
Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
612 bytes

Here's a patch that just removes that hunk. I'll ask davereid if it's the right thing to do. I don't think this flush is required any more.

Dave Reid’s picture

Status: Needs review » Reviewed & tested by the community

Yeah there's no caching of token values at all in D7 since they are lazy-generated, so as long as you're providing an up-to-date $account object to token_replace(), you should be fine.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, role_change_notify.remove_token_get_values.patch, failed testing.

rfay’s picture

Status: Needs work » Fixed

Thanks, @davereid.

Committed: b842109

This will be in the next dev. I'll roll a release someday if there's no negative feedback (or if anybody requests it)

Status: Fixed » Closed (fixed)

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