taxonomy image url of the form categoryview?tid=5 is escaped and cannot be displayed (permission denied error)
| Project: | Taxonomy Image |
| Version: | 6.x-1.6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Scenario is as follows:
Use views 2, taxonomy_redirect, taxonomy_image.
The views2 module generates a url for showing all children of parent category using an exposed filter. This results with the following URL being passed to taxonomy_image (since it contributes the taxonomy image link field to the view): categoryview?tid=6
(Probably not relevant but i'm not 100% sure): Use url_redirect to have destination taxonomy pages showing sub-categories in the same fashion as their parents (i.e. display children categories).
Failure: The Url generated for the taxonomy term field is correct (i.e. ) however for the image link it generates the escaped form (i.e.
The following code modifies the url by escaping the ? and = symbols, resulting with permission denied error in drupal.
File: views_handler_field_taxonomy_image.inc,v 1.1.2.2 2008/11/19 16:02:10 nancyw Exp $
function render($values).
A temporary hack workaround as follows worked but doesn't smell right... (I'm totally new here):
...
// Output image as a link, if option is set.
if ($this->options['link_to_taxonomy']) {
$alink = drupal_get_path_alias(taxonomy_term_path(taxonomy_get_term($tid)));
$image = l($image, $alink, array('html' => TRUE));
// BUGBUG [ES]: Hack! Decode the url (turn %xx back to '?' or '=' etc) - reverse any encoding in l().
--> $image= urldecode($image);
}
I'd appreciate any advise on the right solution.

#1
* rewriting the section that automatic html messed up:
...
Failure: The Url generated for the taxonomy term field is correct (i.e. ... href="/drupal/categoryview?tid=7") however for the image link it generates the escaped form (i.e. ... href="/drupal/categoryview%3Ftid%3D7"
...