I am getting the below fatal error when i click content type > content x > manage fields > click edit:

"Fatal error: Call to undefined function drupal_array_diff_assoc_recursive() in /home/content/65/11722765/html/sites/all/modules/token/token.pages.inc on line 23"

Please help.


  • What version of Drupal, what version of Token? (hint: your core is probably way behind if you're getting that error, that function was added in something like Drupal 7.23 IIRC)
    – Clive
    Commented Jun 1, 2015 at 14:54
  • Drupal 7.22 Token 7.x-1.6 If i disable token module, error goes away. But i do need the token module. I will not be able to upgrade drupal now. Can you help me fixing the error? Thanks.
    – autop
    Commented Jun 1, 2015 at 15:42
  • You've got a couple of pretty nasty options (I've put them in an answer), if those don't work, the only thing you can do is upgrade core. You need to upgrade anyway top be fair, your current site is horrifically insecure. Follow the link in the answer.
    – Clive
    Commented Jun 1, 2015 at 15:49

1 Answer 1


drupal_array_diff_assoc_recursive() was added in Drupal 7.23, and you have a lower core version than that.

You could try copy/pasting the function somewhere into your current core as a hack, but don't be surprised if it doesn't work.

Or you could try hacking at the Token module to remove its reliance on that function, or install an older version of Token altogether, which doesn't rely on it.

Basically you're in "no warranty" territory; if you update one part of your codebase, but refuse to update the rest of it, you can't expect it to carry on working.

The proper solution is to upgrade your core version ASAP, not just for this, but mostly for https://www.drupal.org/SA-CORE-2014-005.

  • Thanks. This issue seems to also pop up if you have e.g. Drupal 7.14 plus security patches as available in Debian 7 Wheezy. Token 7.x-16 seems to have not declared that it requires at least Drupal 7.23 and hence could be installed on older Drupal 7 versions which don't work with it. One solution in this case is to use Drupal 7.32 from the wheezy-backports repository. That's at least the way I plan to fix this in my case. Commented Jan 11, 2016 at 16:54
  • Thank you this is very help full for me. I have added this function to includes/common.inc file. Commented Dec 20, 2016 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.