Following on from the issues raised in http://drupal.org/node/1249646
This patch must be applied after http://drupal.org/files/issues/dart-tax_0.patch
The javascript tags are fine thanks to the dynamic tile values using JS evaluation. However the tile values on noscript tags are all set to 1.
dart_tag_prepare_noscript is incorrectly assuming that $special_key_vals is an associative array but is actually in the format below.
array
0 =>
array
'key' => string 'tile' (length=4)
'val' => string 'tile++' (length=6)
'eval' => boolean true
1 =>
array
'key' => string 'ord' (length=3)
'val' => string 'ord' (length=3)
'eval' => boolean true
Therefore the check before incrementing $tile is not firing because $special_key_vals['tile'] is never set.
isset($special_key_vals['tile'])
The tile value should only be incremented after it is put into the tag as the first call fetches it from the initial value variable.
If the tile or ord values are not set to eval and contain a value this must be used rather than the automatic value.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | noscript-tile.patch | 1.21 KB | bleen |
| dart-tile_0.patch | 1.63 KB | jamiecuthill |
Comments
Comment #1
bleen commentedok ... now I see the issue. I missed the part where you were saying this happened in noscript tags. Makes sense.
I'll take a closer look at this soon
Comment #2
bleen commentedOk .. I'm committing this simpler version of the patch in the original post.
A couple of notes:
1) there is no reason to check for eval=TRUE because we will always explicitly handle special_key_vals.
2) there is no need for $current_tile and $current_ord ... the real problem was that were simply never satisfying those if statements correctly
Thanks for tracking this down jamiecuthill