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.
I am trying to use omniture_set_variabes, but looking at the code it does not look like this will set a variable unless that variable is also set using hook_omniture_variables
$extra_variables = omniture_get_variables();
if ($omniture_hooked_vars = module_invoke_all('omniture_variables', $main)) {
if (isset($omniture_hooked_vars['header'])) {
$header = $omniture_hooked_vars['header'];
}
if (isset($omniture_hooked_vars['variables'])) {
// We need to merge some variables here.
foreach ($omniture_hooked_vars['variables'] as $k => $v) {
if (is_array($v)) {
$v = $v[count($v)-1];
}
if (isset($extra_variables[$k])) {
$v = $extra_variables[$k];
}
$extra_variables_formatted .= "$k=\"$v\";\n";
}
}
if (isset($omniture_hooked_vars['footer'])) {
$footer = $omniture_hooked_vars['footer'];
}
}
it seems that $v = $extra_variables[$k]; is the only place a value was pulled from $extra_variables
maybe a
foreach ($extra_variables as $k=>$v) {
$extra_variables_formatted .= "$k=\"$v\";\n";
}
is needed?
Comment | File | Size | Author |
---|---|---|---|
#1 | omniture-962334.patch | 414 bytes | e2thex |
Comments
Comment #1
e2thex CreditAttribution: e2thex commentedThe attach patch adds the code describe above.