Project:Vocabulary Permissions
Version:6.x-1.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I get this message:

warning: key() [function.key]: Passed variable is not an array or object in /home/...../public_html/sites/all/modules/vocabperms/vocabperms.module on line 158.

I have 3 vocabularies for 1 content type. 2 roles can edit the node but only one can edit the vocabulary. The first vocabulary hides perfectly, but the second and third make use of taxonomy super-select to display and give above error message.

Is this a serious issue to fix? I need to use taxonomy super-select to display a country - town vocabulary.

Comments

#1

The error is thrown because the node edit form doesn't have a default value or any options for your taxonomy being controlled by vocabperms. Can you add some terms to the taxonomy? If so, this is the solution. If not, please explain why, and I can add an additional check for this missing value.

#2

Getting the exact same error. All my Vocabs have terms.

#3

just saw this module and trying it out now.. very cool.. such a pain to form alter and hide vocabs since can't just set them to hidden.

just wanted to confirm that i have the same issue as posted here - and i do have tax super select as well.

doens't look like much activity here; so i guess ill fix and post patch... just give me a few minutes...

#4

ok, digging in a little more i think it is safe to say at this point that this module wont work with tax super select.. likely a fair bit of recoding to make it work.

#5

Title:vocabperms.module on line 158» support for tax super select module
Status:active» needs review

ok, not as tough as i thought.. i have attached small patch to make this module compatible with the taxonomy super select module.

i am also changing the title to be more fitting, and changing status.

pretty unobtrusive patch; hopefully it can get committed to cvs :).

Peter Lindstrom
LiquidCMS - Content Management Solution Experts

AttachmentSize
tss_support.patch 1.58 KB

#6

Status:needs review» fixed

I re-worked your patch a little, tested it with taxonomy super select and committed it. Thanks for the help. FWIW, I've attached the patch that I ended up committing so you can see how I implemented this.

AttachmentSize
174514.patch 2.05 KB

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#8

Status:closed (fixed)» active

finally got around to trying your re-write of my patch and it doesn't seem to work.

maybe not using the right thing though, i pulled the dev copy from project page which is:

5.x-1.x-dev 2008-Mar-17

since you say you committed your patch around Feb 10.

so ill set back to active for now

oh, and by "not work" i mean i can't submit a hidden TSS field which is set to required - since values are dumped and it needs a value since required.

#9

This patch is in the 5.x-1.1 and 5.x-1-dev versions. vocabperms.module 1.1.2.12 and higher. I clean your patch up, but I thought that I mostly only changed style and not substance. Sorry. If this doesn't work, could you try debugging it again. Thanks!

#10

Status:active» closed (fixed)

#11

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

Any chance someone has a patch for the drupal 6 version?

#12

Version:6.x-1.1» 6.x-1.x-dev
Status:closed (fixed)» active

Sure! But I think this feature in already in 6.x. I'll check it back home.

The behavior you have is exactly what was mentioned by OP?

#13

The behavior I was seeing was that roles excluded by permissions could still see vocabularies they shouldn't be seeing. Since you said you thought the feature was in 6, I went to the system table and set the weight of this module so it loads after the super select module. Bingo - it works.

Sorry for the bother and thanks for a great module.

#14

Status:active» closed (fixed)