This error occurs when ever I try to save a new content. the content is not saved many other errors are popping up with the seo tools suite ive installed (fresh drupal install). please help

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andai’s picture

same error here

andai’s picture

I removed that error to token.module to added that
define('TOKEN_PREFIX', '[');

/**
* The default token suffix string.
*/
define('TOKEN_SUFFIX', ']');

function token_replace_multiple($text, $types = array('global' => NULL), $leading = TOKEN_PREFIX, $trailing = TOKEN_SUFFIX, $options = array(), $flush = FALSE) {
// Ensure that the $text parameter is a string and not an array which is an
// invalid input.
if (is_array($text)) {
foreach ($text as $key => $value) {
$text[$key] = token_replace_multiple($value, $types, $leading, $trailing, $options, $flush);
}
return $text;
}

// If there are no tokens to replace, just return the text.
$text_tokens = token_scan($text, $leading, $trailing);
if (empty($text_tokens)) {
return $text;
}

$full = new stdClass();
$full->tokens = $full->values = array();

// Allow global token replacement by default.
if (empty($types) || !is_array($types)) {
$types = array('global' => NULL);
}

foreach ($types as $type => $object) {
$temp = token_get_values($type, $object, $flush, $options);
$full->tokens = array_merge($full->tokens, $temp->tokens);
$full->values = array_merge($full->values, $temp->values);
}

// Support clearing out tokens that would not be replaced.
if (!empty($options['clear'])) {
foreach ($text_tokens as $token) {
if (!in_array($token, $full->tokens)) {
$full->tokens[] = $token;
$full->values[] = '';
}
}
}

$tokens = token_prepare_tokens($full->tokens, $leading, $trailing);
return str_replace($tokens, $full->values, $text);
}
, put i dont know now is modul work's as it must be

kingfisher64’s picture

I'm getting the same

( ! ) Fatal error: Call to undefined function token_replace_multiple() in sites\all\modules\contentanalysis\contentanalysis.module on line 790

Installed mods

content analysis beta4
content optimizer beta4
keyword analysis beta3
readability rc2
alchemy beta1
keyword research alpha3
wordstream beta1
seo tools alpha4

dependicies for seo tools

redirect beta4
strongarm beta5
insight alpha2

will2682’s picture

#2 worked for me

chubbell’s picture

if #2 worked to fix the error can you please help me to understand the fix a little better as in paste this code where?

kingfisher64’s picture

Can we have #2 put into a release? I've noticed that beta and alpha versions are coming out every couple of days for this mod and related mods.

davidfells81@gmail.com’s picture

Changing token_replace_all to token_replace should be all that's required. token_replace_all was removed in Token for Drupal 7 and token_replace was upgraded.

davidfells81@gmail.com’s picture

SocialNicheGuru’s picture

patch doesn't apply. I think it has to be created from within the content analysis directory. I edited the patch header and it was fine.

But the patch seems to work fine. thanks!

davidfells81@gmail.com’s picture

Is this one right? I'm used to applying, not making patches. I generated it from inside the contentanalysis directory this time. Thanks for letting me know it was wrong !

michaelrajchandra’s picture

I am facing the same problem...

Unfortunately I dont know to apply Drupal Patches.... So cant use the solution posted here, I guess I have to wait for the module update...

chubbell’s picture

Status: Active » Reviewed & tested by the community

I can confirm that manually editing the code does indeed clear this error. Thanks #2

TomDude48’s picture

The call has been removed in the beta5 release of the Content Analysis. Sorry I didn't mention that earlier.