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.
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
Comments
Comment #1
andai CreditAttribution: andai commentedsame error here
Comment #2
andai CreditAttribution: andai commentedI 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
Comment #3
kingfisher64 CreditAttribution: kingfisher64 commentedI'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
Comment #4
will2682 CreditAttribution: will2682 commented#2 worked for me
Comment #5
chubbell CreditAttribution: chubbell commentedif #2 worked to fix the error can you please help me to understand the fix a little better as in paste this code where?
Comment #6
kingfisher64 CreditAttribution: kingfisher64 commentedCan 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.
Comment #7
davidfells81@gmail.com CreditAttribution: davidfells81@gmail.com commentedChanging 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.
Comment #8
davidfells81@gmail.com CreditAttribution: davidfells81@gmail.com commentedHere's a patch
Comment #9
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedpatch 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!
Comment #10
davidfells81@gmail.com CreditAttribution: davidfells81@gmail.com commentedIs 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 !
Comment #11
michaelrajchandra CreditAttribution: michaelrajchandra commentedI 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...
Comment #12
chubbell CreditAttribution: chubbell commentedI can confirm that manually editing the code does indeed clear this error. Thanks #2
Comment #13
TomDude48 CreditAttribution: TomDude48 commentedThe call has been removed in the beta5 release of the Content Analysis. Sorry I didn't mention that earlier.