Closed (duplicate)
Project:
Taxonomy Access Control
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2007 at 09:23 UTC
Updated:
25 Feb 2010 at 05:05 UTC
How do we redirect the denied users to be automatically redirected to Register / login page?
Presently, we have some taxonomy terms that cannot be accessed by anonymous users. When an anonymous user clicks the terms the message says, 'There are currently no posts in this category'. We don't want that. We want the users to be redirected to the login/register page. How do we do that?
thanks & regards,
murali.
Comments
Comment #1
Hituro commentedI'm having the same problem
I have a 'members' taxonomy term and I have set view to deny for anonymous users. When they click on the taxonomy term I want them to get a login page, not a 'page not found'. Is this a taxonomy_access issue, or a Drupal ACL issue?
Comment #2
Hituro commentedWe have implemented a fix by altering the taxonomy module. The problem is that when the taxonomy module is asked for a listing page it first checks to see if the term exists AND you have view access to it. If you don't have access to it then it treats it as not found.
We added the following code to the end of taxonomy_term_page() in taxonomy.module
Comment #3
darumaki commentedcould you specify exactly where and how you add the code ? i tried adding it but results in blank page
Comment #4
Hituro commentedFirstly this is in 5.1
In modules/taxonomy/taxonomy.module around line 1317 in function taxonomy_term_page() there is an if statement starting
At the end of this if, around line 1413 add the code given above after the ending }
Hope that helps
Comment #5
darumaki commentedthanks unfortunately it still results in blank page in 5.5
this is what i have
Comment #6
xjmThere's two parts to this: TAC's handling of what should be 403s, and the redirects.
The latter is beyond the scope of TAC, I think; but the former is related to #573674: Deny access to term page? and #311649: "Page Not Found" error for all non-accessible term pages. Marking duplicate.