array exists in role_weight error

Liliplanet - September 16, 2009 - 04:15
Project:Role Weights
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Hi,

I seem to be getting this error after installing role_weight (before I imported my users) when cron.php runs ..

array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in /home/public_html/sites/all/modules/role_weights/role_weights.module on line 275.

What could be causing this please?

Look forward to any reply, and thank you for this module.

Lilian

#1

Liliplanet - September 18, 2009 - 10:32
Priority:normal» critical

Hi again,

Just hoping for a resolution of the error in my dblog please ..

array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in /home/public_html/sites/all/modules/role_weights/role_weights.module on line 275.

#2

perke - October 4, 2009 - 13:38

I'm having same error when using [heaviest-role-id] token in pathauto settings for automated users paths...it also doesn't add anything in path in this combination of tokens [heaviest-role-id]/[user-raw] to get the users paths in form of rolename/username

using role_weights-6.x-1.5

here is error

warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/user/public_html/sites/all/modules/role_weights/role_weights.module on line 275.

#3

jasont28 - October 13, 2009 - 10:35

I am also running into this error. I'm not sure if it is actually affecting anything negatively as I cannot find any problems it is causing. Obviously it isn't good to have the error there.

Jason

#4

Liliplanet - October 20, 2009 - 10:50

Is there perhaps any update on this error please? This module is incomplete .. (and I sponsored the update :)

#5

heyyo - October 24, 2009 - 16:55

Same error here. This module is useless to use roles as token in url aliases...

#6

Liliplanet - October 29, 2009 - 15:08

Please Paul, any update would be greatly appreciated ..

#7

Liliplanet - November 2, 2009 - 13:29

Please Paul, could you fix the error .. have been waiting for weeks and as you know, very important to my site ..

#8

heyyo - November 3, 2009 - 11:55

I don't use this module anymore, I have made my own token, see this post for more information:
http://drupal.org/node/613938

#9

Liliplanet - November 3, 2009 - 13:14

Heyyo, thank you for your response. I had a look at your post, but don't get it, is that a module? Would you give us a better description of what to do please?

Paul, any news perhaps?

#10

leafish_paul - November 4, 2009 - 12:18

Please try the line in question to:

<?php
if (is_array($roles) && array_key_exists($rid, $roles)) {
?>

Does this fix your problem?

#11

Liliplanet - November 5, 2009 - 11:51

Hi Paul,

I've just done the patch, and for the past couple of minutes do not see the error, but ...

The sort by role weight in views definitely does not sort by role weight .. I've setup the highest to lowest in roles.

Please Paul, this is so important.

Look forward to hearing from you.
Lilian

#12

Liliplanet - November 5, 2009 - 12:10

Attached is my view ..

AttachmentSize
directory.txt 19.12 KB
 
 

Drupal is a registered trademark of Dries Buytaert.