Several folks have asked for it... here it is.
-Steve

CommentFileSizeAuthor
#10 taxonomy_6.module45.76 KBshouchen
taxonomy_5.module45.76 KBshouchen

Comments

shouchen’s picture

Of course, you'll need to change the name to taxonomy.module

hpn’s picture

Its a pretty confusing situation. Is this patched taxonomy module to be used with cvs version of taxonomy_acess?

I tried this patched version of taxonomy module with taxonomy access available for 4.6.3. The access restrictions work only on the taxonomy page and does not work on nodes.

Maniac8888’s picture

What exactly does this patch do and why?

shouchen’s picture

Several people were having a difficult time applying the patch for taxonomy.module in 4.6.3, so I posted it here. You can achieve the same result by applying the patch yourself as described in the installation instructions. It is for use with the current version of taxonomy_access for 4.6.3 (as the issue title indicates).

This taxonomy.module file is NOT for use with the CVS (HEAD) version of taxonomy_access. In fact, if you read the documentation, you'll see that taxonomy.module no longer needs to be patched to use the CVS (HEAD) version of taxonomy_access.

Maniac8888’s picture

"Several people were having a difficult time applying the patch for taxonomy.module in 4.6.3..."

OK, now I remember. Thanks for the prompt reply.

davidgibbens’s picture

Hi
I recently installed taxonomy access module on 4.6.3 - and the associated patch to taxonomy module - and I have it working on flexinodes, forums and pages (pretty much all I am using of content types at the mo). But the logic of the whole thing can be difficult to follow. What do you mean by (sorry to be dense) the "taxonomy page" and what sort of node doesn't it work on?

The way I have it set up, I add a taxonomy vocabulary called "availability". To this I add terms "visitor", "associate", "full member" and "exec member". (Obviously these correspond to some of my access roles).

Then I go to the "category permissions" tab in administer>access control. This gives you a list of all the roles you have defined within your normal access control screen. For each role I select it and it then lists all of my vocabularies and the terms in them. Now, for each of these I'll check off what this particular role can and can't see/do. Now of course one of the vocabularies is the availability one. For anonymous user, I'll check off the "view" box next to the "visitor" term. And within my site -that's all they get.

To make this work right, of course, all my other roles have to be given the right permissions. Unlike the main role-based access screen, where any logged-in role will inherit all the permissions assigned to a logged-in user, you have to make sure that you explicitly give all the necessary "category permissions". So, to ensure that a logged in user can see pages for both them AND visitors, when I am in my "category permissions" screen assigning access to "logged-in" user I have to tick both the "visitor" term and the "associate" term in that particular vocabulary. For full members I have to tick those two and "full member" term as well.

Then whenever I add content I set the appropriate availability term for that content. For example, if I add a page that can be viewed by a visitor I'll just select the term "visitor" within the vocabulary drop down for that page when I'm editing the node. And that page will then be viewable by a visitor - but also by full members because I have given them access to the "visitor" term too. But if I set the availability term on this page to "full member" the visitor won't be able to see it because they haven't got the full member box ticked in the availability vocabulary on the category permissions page.

This works for me in a relatively simple site which is also highly managed - most people in the community will only participate in the forums - the rest of the site is handled by librarians, administrators, moderators etc. (Well they're all me actually).

Sorry if this is impenetrable but I do think the module works and I suspect some essential step is missing from what you have set up (but see next statement).

It seems to be well-established that only one node-access mechanism will work within a site (unless you do fairly tortuous work-arounds). Thus if you have og or simple_access installed then taxonomy_access may not work as planned.

I also screwed up the install at some point when replacing simple_access with taxonomy_access. There is a sequence of disabling (simple_access) and enabling (taxonomy_access) that has to be done at the right point in the sequence. I think this updates the database tables (prepares them for the module to be used or disenabled). Doing it in the wrong order I got weird results (but not error messages) and had to recover from a backup.

keve’s picture

You are right, I also advise to use one access module (unless you know what you are doing.)

For cleaning up, maybe it would be useful to truncate the "node_access" table, when you change to other access module. (in case you do not want to use the previous module anymore).
If you do so, you can be sure, that previous access modules, have not left any settings in the access system.

Matthew OMalley’s picture

Thank you thank you thank you thank you! I've been trying to get Taxonomy Access up and running for several weeks now, and thanks to this it actually seems like it's working! I had previously tried to manually patch it, but I must have made some mistakes.

Thanks again!

Walt Esquivel’s picture

Hello Shouchen,

I'm a newbie & still a bit confused with regard to the taxonomy.module (that is part of the Drupal core), the taxonomy_access.module (a contributed module), and any necessary patches to these two modules. There are several places here on drupal.org that discuss patches to these two modules (examples, in addition to this page, are http://drupal.org/node/32778, http://drupal.org/node/39863, & http://drupal.org/node/13765, among other places on drupal.org).

I'm on a Linux/Apache/MySQL/PHP stack and I'd like to download the latest stable version, Drupal 4.6.5. Does the taxonomy.module that is a part of the 4.6.5 Drupal core already include the patch for 4.6.3 as found above which you so generously provided? (Thank you, by the way, for your many contributions!!!)

To find the answer to this questioin, I tried reviewing drupal.org forum posts as well as the Drupal 4.6.4 and 4.6.5 announcements (http://drupal.org/drupal-4.6.4 and http://drupal.org/drupal-4.6.5), but I couldn't find mention of any fix in 4.6.4 or 4.6.5 relating to the taxonomy.module and/or taxonomy_access.module patches, or perhaps it was there yet not plain enough for me to see.

I've tried figuring out how to patch code but I'm not there yet. If I'm required to patch taxonomy in 4.6.5, I might just be forced to go with 4.7.0. If taxonomy access is still an issue in 4.6.5, do you know if this has been fixed in 4.7.0-beta2?

I appreciate and look forward to your feedback. Again, thank you very much in advance.

Happy holidays,
Walt

shouchen’s picture

StatusFileSize
new45.76 KB

WellnessCorps,

To have the latest 4.6 code... You should be able to download Taxonomy Access from here (http://drupal.org/project/taxonomy_access), install it, and then replace your taxonomy.module with the one I've attached to this reply. It includes the most recent taxonomy_access patch for taxonomy.module.

Steve

shouchen’s picture

Title: Patched taxonomy.module for 4.6.3 as of November 9 2005 » Patched taxonomy.module for 4.6.3 as of December 18 2005

(Changed title)

keve’s picture

Title: Patched taxonomy.module for 4.6.3 as of December 18 2005 » Patched taxonomy.module for 4.6.5 as of December 18 2005

Thanks shouchen for helping me out on answering the issues :)

Does this latest patch for 4.6.5 (4.6.4 is the same), isnt it?

shouchen’s picture

keve,
You are welcome. I do what I can... The module that I posted is based on the current 4.6 branch in CVS (for taxonomy.module and taxonomy_access). So, I guess that makes it compatible with 4.6.5?
Steve

VOX-1’s picture

Oh my GOD!!!

Thanks for this!!!!

I'm a newbie and trying to apply this patch was killing me.

keve’s picture

Status: Fixed » Closed (fixed)

Since a lot of people have troubled patching, I included the latest patched taxonomy.module in tarball.