Needs work
Project:
Taxonomy Access Control
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Sep 2008 at 06:23 UTC
Updated:
15 Apr 2012 at 10:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
wangmz commentedThe reason for the bug is that taxonomy.module accept the term set from "Taxonomy Access Control" as the existing terms, but not compare with the database. The solution is to have a double check against the database, thus can identify the terms that are not existing and that are not permitted.
The modification is to change the default return of the function taxonomy_term_page() in modules/taxonomy/taxonomy.pages.inc:
if ($names) {
... ...
}
else {
/* content added to test if the term exist but filtered by taxonomy access control module */
foreach ($terms['tids'] as $termId) {
if (isset(taxonomy_get_term($termId)->name)) {
drupal_access_denied();
return;
}
}
/* end the modification */
drupal_not_found();
}
I hope this information is useful and someone can make a patch to the repository after checking my codes. Thank you.
Comment #2
Anonymous (not verified) commentedThis is not a patch. See http://drupal.org/patch/create for details of how to create a patch.
Comment #3
catchIt's not a patch, but it's still a bug, so should be set to active.
Comment #5
WorldFallz commentedBug Bingo!
Proper patch attached.
Comment #7
mr.baileysIMO this is not a core bug: users with "access content" permissions can visit the term page, users without permission get an "access denied". If taxonomy access control changes the behavior, it's probably best placed to handle this (maybe change the access callback through hook_menu_alter?)
Comment #8
xjmMarked #688664: Inconsistent Messages When Viewing Inaccessible Content as duplicate of this.
Comment #9
xjmMarked #323790: Page Not Found as duplicate of this issue. We should try to find a fix for this in D6 first, then backport to D5 if possible/time permitting.
Comment #10
xjmMarked #181461: Denied users to be redirected to Register /login page as duplicate.
Comment #11
gusanocomemuerto commentedSo what is the workaround? We are restricting access to different kinds of content through taxonomy access control lite. Our customers are going to pay for access to different taxonomy channels, and if they haven't paid for access to a given channel, I need to prompt them to subscribe, not tell them the content doesn't exist. I can do this using the error reporting control, but this means that we won't be able to tell genuine page not found errors from information that is unavailable due to their user role. So if there is a genuine 404 problem, we don't want to tell them it's because they didn't subscribe.
Comment #12
xjmThere are two possibilities for workarounds that I can see until this is fixed in TAC:
I have used #2 in the past, but it is not the best solution. I'd test the patch first (thoroughly and on a non-production site).
If you are having this problem in TAC lite, I recommend submitting an issue to that issue queue as well:
http://drupal.org/project/issues/tac_lite
Comment #13
xjmMarked #573674: Deny access to term page? as duplicate of this issue.
Comment #14
xjmSee #679308: inaccessible nodes still listed in menus? (drupal 6).
Comment #15
xjmMarked #1218106: Prompt for login at taxonomy term as duplicate.
Comment #16
neilb2 commentedI am experiencing this problem on a site. Could someone please confirm that the problem is being caused by the issue being discussed in this thread?
Latest versions of Drupal 6, TAC and Taxonomy Access Control installed.
When taxonomy/term/% view is switched OFF in Views (and hardcoded term page is used):
When taxonomy/term/% view is switched ON in Views:
Is this the current behaviour of this combination of modules/views?
My desired outcome would be where the taxonomy/term/% view is switched on in Views, but with the Taxonomy Menu correctly displaying only the vocabs/terms the user has access to and any non-accessile term pages 404ing (or 403ing).
Any help much appreciated.