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.

CommentFileSizeAuthor
#6 174514.patch2.05 KBdouggreen
#5 tss_support.patch1.58 KBliquidcms

Comments

douggreen’s picture

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.

chadchandler’s picture

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

liquidcms’s picture

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...

liquidcms’s picture

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.

liquidcms’s picture

Title: vocabperms.module on line 158 » support for tax super select module
Status: Active » Needs review
StatusFileSize
new1.58 KB

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

douggreen’s picture

Status: Needs review » Fixed
StatusFileSize
new2.05 KB

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.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

liquidcms’s picture

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.

douggreen’s picture

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!

jcisio’s picture

Status: Active » Closed (fixed)
jday’s picture

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

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

jcisio’s picture

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?

jday’s picture

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.

jcisio’s picture

Status: Active » Closed (fixed)