When applying the taxonomy.patch to the taxonomy.module, v 4.6.0, the following is reported by the patch program:

Hunk #1 succeeded at 387 (offset -56 lines).
Hunk #2 FAILED at 442.
Hunk #3 succeeded at 466 (offset -76 lines).
Hunk #4 succeeded at 485 (offset -76 lines).
Hunk #5 succeeded at 521 (offset -133 lines).
Hunk #6 succeeded at 549 (offset -133 lines).
Hunk #7 succeeded at 573 (offset -133 lines).
Hunk #8 succeeded at 617 (offset -133 lines).
Hunk #9 succeeded at 649 (offset -133 lines).
Hunk #10 succeeded at 698 (offset -133 lines).
Hunk #11 succeeded at 775 (offset -133 lines).
Hunk #12 succeeded at 804 (offset -133 lines).
Hunk #13 succeeded at 837 (offset -133 lines).
Hunk #14 succeeded at 1016 (offset -136 lines).

Comments

amanda’s picture

I think the patch is for 4.5.2

pyromanfo’s picture

No it's for 4.6.0, it worked against the CVS version a few days before release, I don't know what they changed.

I'll take a look.

tostinni’s picture

pyromanfo’s picture

bmossavari’s picture

I used drupal on windows server(iis technology) and use 4.6.0 version ,the orginal taxonomy_access module that you provide on download section did't work for me ( after set the permission , user can see all the taxonomy !!!)
i try to patch that (taxonomy_7.patch and also taxonomy.patch that you provide with tar pakage)with Cygwin but it create error just like the other said, after that i try your cvs version but it didn't work so....! please someone tell what to do ....

bomarmonk’s picture

The latest taxonomy.patch (CVS) does patch cleanly against the official 4.6 release of the taxonomy.module. It does not apply cleanly against the latest CVS (they keep overhauling how it works in CVS). But you should be okay... I use Cygwin on my Windows XP machine, and as long as I ensure that I have the latest taxonomy.patch and the official 4.6 release, there are no problems. Hope that helps!

gatezone’s picture

Install doc says:

2) Copy taxonomy_access.module to your drupal installation's module directory

3) Patch taxonomy.module with the included taxonomy.patch with the command 'patch -p0 < taxonomy.patch' while in your drupal installation's module directory.
----
These instructions do not appear to be complete. I copied the module to the module directory. then ran the command from the module directory. Result: "taxonomy.patch: No such file or directory" Thought I'd try moving the patch to the module directory (not leave it in the access module directory, but all the 'hunks' failed.

If something different needs to be done in the patch process then the instructions might need to be more complete and a little more clear. I'll bet a line or two more would clarify if the patch has to be moved before running the command??? If there is a csv patch that works for patching 4.6 then can it be included with the 4.6 module? Do I need to go learn more about patching instead of following the included instructions?

tostinni’s picture

You should put taxonomy.module and taxonomy.patch in the same directory in order to apply it correctly.

gatezone’s picture

Ran it and got this:
=============================
(Stripping trailing CRs from patch.)
patching file taxonomy.module
Hunk #1 FAILED at 387.
Hunk #2 FAILED at 441.
Hunk #3 FAILED at 466.
Hunk #4 FAILED at 485.
Hunk #5 FAILED at 521.
Hunk #6 FAILED at 549.
Hunk #7 FAILED at 573.
Hunk #8 FAILED at 617.
Hunk #9 FAILED at 649.
Hunk #10 FAILED at 698.
Hunk #11 FAILED at 775.
Hunk #12 FAILED at 804.
Hunk #13 FAILED at 837.
Hunk #14 FAILED at 1015.
14 out of 14 hunks FAILED -- saving rejects to file taxonomy.module.rej
=============================
.reg file attached

gatezone’s picture

Previous posts about patch relate to following environment: clean install of 4.6, on Redhat enterprise Linux.

I'm seeing all the configuration settings for access control but they are not working, I assume because of patch failure.

Is there an Access Control system (yours?) heading to drupal core? Seems very challenging for this to be outside of core when it needs to patch a core module (taxonomy). Thanks for any ideas on getting this to work on 4.6 GZ

gatezone’s picture

May I assist with the documentation on this if I get it runing?

tostinni’s picture

I supposed you used the correct taxonomy.module (4.6) and not CVS ?
Have you checked if your files are in the correct format ? I mean, are they both in UNIX format ?
I encounter this problem, I was making my patch against a windows modified file and when I made patch, I got error, though everything was fine.

Converting back my taxonomy file under a UNIX format made the trick.

killes@www.drop.org’s picture

How about distributing a patched taxonomy.module for the stable 4.6 branch?

gatezone’s picture

"supposed you used the correct taxonomy.module (4.6) and not CVS ?
Have you checked if your files are in the correct format ? I mean, are they both in UNIX format ?
I encounter this problem, I was making my patch against a windows modified file and when I made patch, I got error, though everything was fine."

Clean install of 4.6, with the patch that came with it it. Very straight-forward. In my opinion modules need better information/ documentation if they include patches to drupal-provided modules like taxonomy. The patch instructions are incorrect in their detail. It needs to say that the patch has to be *moved* or copied out of the taxonom access module subdirectory up one directory to the root of the module directory to run... and then the bit about windows & UNIX file formats needs more explanation or a pointer if it is a known issue. What needs to be done for me to run the patch. It sound like you may be saying that the even though I got errors it might be ok? I can try the access again but last time I tried it was not functioning to limit access to anon users. I'm grateful that someone has developed such a module as access control a very important need in a system like Drupal. ~GZ

bmossavari’s picture

I'm lettle confused here !!! what version should i download for ver 4.6.0 !!!? cvs or orginal????
I check them both but the patches you provide faild for both , I look at the source code of taxonomy_access.module and toxonomy.patch , there is realy problem, the patch is not for that version ( both cvs & orginal!!!)
without patching it won't work! and it couldn't patched !!! what the big problem here :(((

tostinni’s picture

Ok I triple checked files and version :
gatezone :
It seems that the patch distributed by pyromaninfo (the one I gave him) was with a wrong type. You have to convert it first in UNIX type to be able to patch. I don't understand why patch fail on so trivial checks (IMHO) but don't focus on it, just change the format regarding http://drupal.org/node/323#comment-14740 and patch again It would work.
Regarding of the help... Well, for me it was clear enough that when you type such command : patch -p0 < taxonomy.patch, you should have both files in the same directory, but yes maybe it should be clearer. In fact I would prefer such command : patch taxonomy.module taxonomy.patch which is clearer ;)
I didn't tell you to ignore errors ;), obviously it won't work if there's some errors.

bmossavari :
You need to use taxonomy.module shipped with 4.6 version of Drupal and apply the path, reread my advices it should work fine.
I don't understand what did you look at in the source code ?
And yes, it is for the correct version (4.6.0), I made the test again.

Well, as I understand there's a lot of confusion about patching, here is the patched version of taxonomy.module for 4.6.0.

PS : it seems there's some error about the upload directory :
The selected file could not be uploaded, because the destination is not properly configured. ask the file through my contact form, I would sent it by mail, I think it's too big to be paste there.

gatezone’s picture

Title: taxonomy.patch does not apply cleanly » Hunky Dory Not: taxonomy.patch does not apply cleanly

Converted files to UNIX format, transferred file to server, ran patch... same results.

# patch -p0 < taxonomy.patch
patching file taxonomy.module
Hunk #1 FAILED at 387.
Hunk #2 FAILED at 441.
Hunk #3 FAILED at 466.
Hunk #4 FAILED at 485.
Hunk #5 FAILED at 521.
Hunk #6 FAILED at 549.
Hunk #7 FAILED at 573.
Hunk #8 FAILED at 617.
Hunk #9 FAILED at 649.
Hunk #10 FAILED at 698.
Hunk #11 FAILED at 775.
Hunk #12 FAILED at 804.
Hunk #13 FAILED at 837.
Hunk #14 FAILED at 1015.
14 out of 14 hunks FAILED

The real question is when is Drupal going to have built-in taxonomy and node level access control?

I will open the file on the server with an editor there and see if the file looks correct.

GZ

tostinni’s picture

Well I also made the test : I uploaded the patch and the module to a folder in may FreeBSD server, I change format to Unix with the tool I gave you a few post up, and run :

bash-2.05b$ patch -p0 < taxonomy.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- taxonomy.old       Thu Apr 14 14:43:04 2005
|+++ taxonomy.module    Wed Apr 27 12:24:06 2005
--------------------------
Patching file taxonomy.module using Plan A...
Hunk #1 succeeded at 387.
Hunk #2 succeeded at 441.
Hunk #3 succeeded at 466.
Hunk #4 succeeded at 485.
Hunk #5 succeeded at 521.
Hunk #6 succeeded at 549.
Hunk #7 succeeded at 573.
Hunk #8 succeeded at 617.
Hunk #9 succeeded at 649.
Hunk #10 succeeded at 698.
Hunk #11 succeeded at 775.
Hunk #12 succeeded at 804.
Hunk #13 succeeded at 837.
Hunk #14 succeeded at 1015.
done

I'm sorry I can't post the patched taxonomy module, there's some strange errors.
Drop me a mail, I'll sent it to you (sorry my host doesn't accept hotmail adresses...).

gatezone’s picture

I haven't received anything.

Can someone please point me to a CSV version patch that has proven to work better with 4.6, than what is in the download 'package?' I'd like to show a client that at least access can be discouraged' if not completely prevented from accessing taxonomy categories/terms.

What's the next step for ACL's for Drupal? This approach seems to have a limited 'shelf-life' and from what I can see there are some useability and technical limitations that compare unfavorably with other systems. I know it is a challenging issue, but tight/robust/secure taxonomy and node access is essential for many potential organzational users and their administrators. -- GZ

tostinni’s picture

Title: Hunky Dory Not: taxonomy.patch does not apply cleanly » taxonomy.patch does not apply cleanly
Assigned: Unassigned » tostinni

Mail sent, sorry for the delay

Anonymous’s picture