This module sounds very useful.

Admin interface behaves exactly as described in README file. I've delegated the administer permission on a vocabulary to a certain role, but that role does not see any extra items it in the nav menu. See screenshot.

CommentFileSizeAuthor
menu.PNG1.39 KBfletchgqc

Comments

nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

I keep forgetting some people don't use the "Navigation" menu and that's where the link would be put. Is that the case here?

Some day I'm going to have to figure out how to add a menu entry in a different menu.

fletchgqc’s picture

The README says that it will be put in the Navigation menu.

The navigation menu is the one in the screenshot. The link does not appear there, although it should.

nancydru’s picture

Okay. Something quick to try while I try to figure this out: Go to admin >> settings >> performance and click the "clear cache" button.

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Postponed (maintainer needs more info) » Fixed

I'm pretty sure that made the new item show up in the menu. I've changed the code to force the menu to be rebuilt when the delegation or the menu title changes.

Fix committed to -dev.

fletchgqc’s picture

Status: Fixed » Active

Sorry Nancy but it still doesn't work. Actually I have caching disabled altogether since I'm still in dev.

Have you ever tried the 6.x version to test that it actually works?

By the way on taxonomy_delegate.admin.inc you missed an underscore in line 46. Anyway, with this fixed it still doesn't work for me.

What is the URL that I'm meant to be sent to by clicking on the menu item? I could try entering it directly. I tried copying the path from the admin screen used to add terms to the relevant vocabulary (/admin/content/taxonomy/3/add/term) and was denied access.

nancydru’s picture

Actually, even with caching disabled, menu caching is still active. Several types of caching are always in effect.

Yes, I have tried the 6.x version and yes, it works for me. As a matter of fact, I had to make a small tweak to make it work. That's where the missing underscore came from, and I don't understand why I didn't have a problem with that. I just committed that fix.

It should be going to http://www.example.com/category_admin

nancydru’s picture

Status: Active » Fixed
fletchgqc’s picture

Status: Fixed » Active

Hmm... strange. I get a 404 when I go to that URL (in my case http://localhost/d6/category_admin). Also tried when logged in as administrator and got the same result.

nancydru’s picture

Let's back up a step or two then. When you enable the module, there should be a "Delegation" tab under admin >> content >> taxonomy; is it there? Does it show any vocabulary as delegated? The menu item will also not show up if you don't have any vocabularies delegated to you (even as admin). Delegate a vocabulary to a role and then login as a member of that role. On my test site, the easiest role to test with is "authenticated user".

And, yes, with no vocabularies delegated, I also get a PNF. That's probably good.

fletchgqc’s picture

AHA! Yes it works if you delegate to "Authenticated User". I have a role called "content editor" and I had delegated to that role. Although the user was a member of the role, it did not work.

So I believe that in principal the module works, but there is something wrong with the implementation of roles / permissions. Try it yourself with another role and see how you go...

nancydru’s picture

Hmm, I created a new user with very limited permissions and it is allowed to do everything, so I have a far bigger headache.

However, yes, the menu item displayed.

Does "content editor" have "administer taxonomy" permission?

fletchgqc’s picture

> Does "content editor" have "administer taxonomy" permission?

No. The idea is to avoid that, right?

nancydru’s picture

Yes, that's the idea.

At this point I'm out of magic. Unless I can poke around on your site, or you can come up with more information, I don't have any idea why it's not working for you. You have the same code I do.

nancydru’s picture

I may have just stumbled upon the cause of this. There are some annoying "quirks" in the D6 menu system. Try disabling and then re-enabling the module.

fletchgqc’s picture

Tried it - no success. I think you're looking in the wrong place though if you look at the menus, because the page doesn't work even if I paste the correct URL into the address bar. Therefore it's a permissions issue rather than anything to do with the menu as such.

nancydru’s picture

It just requires 'access content' which pretty much anyone who is supposed to be on your site would have.

missym’s picture

Version: 6.x-1.1 » 5.x-1.2

I am having the same issue and it looks like it is not saving the role properly. I am also using Node Profile. I don't know if that's related. In taxonomy, I save the delegation role to "editor" and when I go back in, it has not been saved. I hope there is a clue there for you.

nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

When you look at the "Delegation" tab, does it show the correct role name? I don't think Node Profile would interfere like this.

missym’s picture

Status: Postponed (maintainer needs more info) » Active

The correct role names are displayed. Everything appears as I would expect. I select the role that I would like to have delegate it and save. I edit it again and the role is not selected. When I look at the taxonomy_delegate database, it is empty. I would be happy to provide you login information if you'd like to personally take a look at the system.

nancydru’s picture

I guess that would help.

fletchgqc’s picture

I'm not using Node Profile, by the way.

nancydru’s picture

@MissyM: I'm looking at your site, and your issue is really the same as http://drupal.org/node/228028. The delegated roles are nor being saved. They are not displayed on the "Delegation" tab nor on the Vocabulary edit page.

@fletchgqc: Can you please check this same situation.

nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

@MissyM: Is there anyway you can get your host to get to supported levels of PHP and MySql? Your versions are very old and unsupported. D7 (right around the corner) will require PHP 5.2.5 or higher and MySql 5 (or Postgres 8) or higher.

I don't have any particular reason to question these, but I have other modules that simply did not work right on PHP 4. But when the users updated to PHP 5, all of a sudden they did. Yes, D5 and D6 are supposed to work on PHP 4.3.5 or above and I am trying to figure out why this module doesn't seem to.

nancydru’s picture

Aha! I did find a bug in the saving code -- I can't figure out why it works for me, but it does. I'm pretty sure this will take care of the problem.

Fix committed to both -dev branches. This will roll up around midnight GMT (8pm ET). Please try it out.

nancydru’s picture

Status: Postponed (maintainer needs more info) » Fixed
missym’s picture

Status: Fixed » Active

Hey Nancy -- I restored my site and updated the module with your fix. It unfortunately didn't work. I left your login info in case you want to look again. I will try to manually add the records if you can tell me what to do. From that I can see if the only problem is the didn't save problem. Thanks --

M.

nancydru’s picture

Did you use the 5.x-1.x-dev version?

matteo.boria’s picture

(first:sorry for my english...)
If you installed Hierarchical Select, I've found an error in its taxonomy sub-module ([..]modules/hierarchical_select/modules/taxonomy.inc). The code "breaks" all other subsequent modules that use the vocabulary editing form. My version is 1.9 (2008/01/19), but the problem persists in the last version available (1.21 - 2008/03/29 in HS 5.x-2.2).
There is an incorrect operation/assignment (+=) for an array: you must change this with array_merge.
(See also http://drupal.org/node/260939)
In my version, the line numbers are 134-135 (function taxonomy_hierarchical_select_form_alter):

$form['#submit']['hierarchical_select_taxonomy_form_vocabulary_submit'] = array();
$form += $second_part;

Correct version:

$form = array_merge($form, $second_part);
$form['#submit']['hierarchical_select_taxonomy_form_vocabulary_submit'] = array();

(you should move the line that adds ['hierarchical_select_taxonomy_form_vocabulary_submit'] after the merge...)
After this correction, my Taxonomy Delegation run properly.
Ciao; Matteo

nancydru’s picture

Thank you, Matteo. This could explain a lot because I don't use HS, so I don't see the problem. Did you submit a patch to HS?

matteo.boria’s picture

Patch(es) submitted.
Sorry for the delay, but I'm a Drupal newbie... "hooks" and "modules" are not so familiar for me.
Ciao;
Matteo

nancydru’s picture

Fabulous. Thanks, Matteo. I won't mark this as a duplicate yet, but we will wait for that issue. http://drupal.org/node/260939

a.mikheychik’s picture

Version: 5.x-1.2 » 6.x-1.x-dev
Component: Miscellaneous » Code
Category: support » bug

So, actually in drupal 6.2 problem with menu item is still relevant.
How I can see, it's connected with this code

  $any = count(_taxonomy_delegate_my_vocabularies());
  if ($any) {
    $items['category_admin'] = array(
      'title' => '@name',
      'title arguments' => array('@name' => variable_get('taxonomy_delegate_menu', t('Administer My Categories'))),
      'page callback' => 'taxonomy_delegate_mycategories',
      'access arguments' => array('access content'),
     );
}

When I commented lines with $any menu started to work.
May be problem with dynamic page creation?

nancydru’s picture

Version: 6.x-1.x-dev » 5.x-1.2

Since the 5.x and 6.x menu systems are so different, I'd really like to separate this issue for the releases. The solution for 5.x will not work in 6.x and vice versa.

Of course you would start seeing the menu with what you did. The problem with your change is that users who don't have any vocabularies delegated to them would also see the menu item. That is not the intent.

There may be a better way to do this, but not your way.

a.mikheychik’s picture

Yes, that's true. So I just add a taxonoy delegate permission to this menu :-)

nancydru’s picture

There is no TD permission.

a.mikheychik’s picture

It is not a problem to add it. hook_perm() works excelent :-)
Actually its just temporary solution :-)

nancydru’s picture

Status: Active » Closed (duplicate)
PolishBen’s picture

Status: Closed (duplicate) » Active

Hi

I don't think this is fixed:

I have one user role defined called admin. I delegate 3 vocabularies to it called gallery, tags and newsletter. I have one user in the admin group called John.

When John logs in he does not see the option "Administer My Categories" in the menu. When he goes to the category_admin page it returns a 404.

If I delegate one or more vocabularies to "authenticated user" then John gets the "Administer My Categores" link back and he can administer all 3 of his categories.

I just downloaded version 6.x-1.3 and am running drupal 6.15.

Apologies if I have posted this in the wrong place - I am a newbie.

Any update to this problem would be much appreciated.

greenbeans’s picture

In D6, I removed the if($any) check and 'access arguments' from taxonomy_delegate_menu() and added an 'access callback' which calls a new function that returns the count of vocabs that the user's role has been delegated. This gets the menu item to show in the Navigation menu but not the Admin Menu for some reason.

nancydru’s picture

Status: Active » Closed (duplicate)

I believe #867614: hook_menu is incorrect. fixes this.