Hi,

There is an awkward behavior with taxonomy redirects when set in Primary Menus. It's difficult to track down what is causing the issue since this affects the Primary Links , Taxonomy Redirect and Panels3. I will try to explain what's the setup and when this issue occurs:
I've set taxonomy redirect paths to different taxonomy terms. Those paths are set as Primary Links and the taxonomy paths are Panels (taxonomy display overide with custom Panels - NOT the system type with /taxonomy/term/%term override). For a while things work as expected , then without dealing with any kind of redirects and path changes , the taxonomy redirect is getting lost (as if something is taking over this override) and the redirect doesn't work. If I change the redirect path to something else it works. Let's say I had a path named "politics" for a term and suddenly this term doesn't do the redirect , if I change the path to eg. "politic" it works. Then after some time (maybe months although usually it happens when changing the weights for sorting the menu links) the "politic" doesn't work and I have to change to a new path to work again. Also the previous and original "politics" still doesn't work so I have to figure out a new path redirect like "political". Keep in mind that the menu is not redirecting to the url I set to that menu link- it links to the /taxonomy/vocabulary/%term although I've set a different path!! This is a very wierd behavior and can't figure out what is causing this (issue with menus , panels or an isolated bug of taxonomy redirect?). Any ideas how to approach this problem?

Comments

timwee’s picture

Hi,

I have the same problem, i tested taxonomy redirect on one term, make the redirect then i notice my primary links go in edit mode, i uninstall taxonomy redirect and nothing is changed. all my primary links are redirected in edit mode.

charos’s picture

Just to figure out the root of evil: You use Panels ? I'm asking this to figure out whether there's conflict between those two.

timwee’s picture

yes i also use panels and front page and all my primary links nodes are in panels

charos’s picture

aha! So your taxonomy redirects are actually panel pages , right? If that's true, then surely there's a misbehavior between those two. The problem is that is not a consistent issue so the module maintainers cannot reproduce it easily. No idea how can this be resolved.
The only way to get over the redirection of edit mode, is to change the path of redirection in those terms. I know this sucks, but I couldn't figure out anything else. If the Taxonomy Redirect maintainer wants to check this , I can make a test site with this issue.

Agileware’s picture

I'm not sure I understand the problem properly.

First of all, taxonomy redirect does not have anything to do with primary links.
As noted on the taxonomy redirect project page:

Note: Taxonomy redirect only uses hook_term_path (http://api.drupal.org/api/function/hook_term_path/6) to modify paths for taxonomy terms, it doesn't actually create path aliases.
This means the redirect only works for taxonomy links placed by the taxonomy module. It also means if you type the url in to your browser the redirect doesn't work.

This also means if you have primary links set for taxonomy/term/%tid or something similar they won't be affected by taxonomy redirect.

Also, there should be no problem with redirecting to a panels page.
Taxonomy redirect is not smart enough to know or care what is on the page you redirect to.
It just changes to link to be whatever is specified in the redirect (eg. "politics").
Then when you click the link your browser goes to example.com/politics.
Then when the panels page at example.com/politics gets displayed it is all panels, taxonomy redirect has already done it's thing.

If you have a redirect for a term to go to "politics" then you go to a node that has that term on it and click the term link on the node page and it goes somewhere other than "politics" then you have a problem with taxonomy redirect.

If that is not what is happening it is probably not taxonomy redirect that is the problem.

If this explanation doesn't explain your problem can you give some more information. Like:
* The url of your panels page
* The redirect url
* What page do you go to instead of the redirect you were expecting (what is the url).
* Explain what link you are clicking that doesn't go to the redirected url.

Thanks

charos’s picture

What you say is all true and that's the reason I said "weird behavior" , because there is no logic behind it. Yet something happens!
I use Taxonomy redirect because my site is in greek so the taxonomy terms are all greek. The idea behind the usage is that I don't want greek characters to go to url (looks bad, shows inconsistency and it's not SEO friendly). Those terms are actually my primary links. First occurrence of this issue happened when I was sorting(weight) those primary links . What happened is the Primary links override Taxonomy redirect. For example assume a term called "πολιτική" . That's greek for politics so I used Taxonomy redirect to make this path instead of "mysite.com/(vocabulary name)/πολιτική" to a panel page url of "mysite.com/politics". When I did the re-sorting , the term above was redirected to "mysite.com/(vocabulary name)/πολιτική-1" instead of "mysite.com/politics" that I used on Taxonomy redirect. As if Primary links was overriding Taxonomy redirect module. Only after changing the redirected path to something else in Taxonomy redirect settings , I got the control of the redirection back. Does that make any sense ?? (!!!)

One more thing: the "hijacked" "mysite.com/(vocabulary name)/πολιτική-1" path is actually redirecting to this panel page. So it's not an empty page. It's just that the printed url is not the one configured in Taxonomy redirect.