Closed (fixed)
Project:
DART
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2011 at 19:56 UTC
Updated:
14 May 2011 at 02:02 UTC
I am updating the site zone attribute value based on the current page path, using dart_tag_alter hook. THis was working perfectly except for the updates not being reflected in the noscript tag. Turns out that the noscript tag processing function is being fired just prior to dart_tag_alter hook:
Line 247 - dart.module (6.x-2.2)
// Build data for the noscript tag.
$tag->noscript = dart_tag_prepare_noscript($tag); // <-- noscript tag is built
// Give other modules the opportunity to add information to this tag.
drupal_alter('dart_tag', $tag); // <-- customization are performed on the $tag object
I'm not sure if this was intentional or not, but reversing the order of these operations fixes the issue.
// Give other modules the opportunity to add information to this tag.
drupal_alter('dart_tag', $tag); // <-- customization are performed on the $tag object
// Build data for the noscript tag.
$tag->noscript = dart_tag_prepare_noscript($tag); // <-- noscript tag is built
Comments
Comment #1
bleen commentedI gave this a bit of thought... which is more important the ability to alter the entire tag object (including the noscript) or the ability to have the keyvals in the noscript tag match the keyvals for the script tag...
I think your right though ... the keyvals need to match.
This fix (from the OP) has been committed to dev
Comment #2
davmorr commentedAh, I see your point. Yeah, I think it is important to keep the script and noscript ad calls consistent - advertisers are a fickle lot. I'm a big fan of exposing as much as possible without compromising performance, core functionality or security.
Comment #3
bleen commented