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
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | role_weights-578692.patch | 1.35 KB | pedrofaria |
| #12 | directory.txt | 19.12 KB | liliplanet |
Comments
Comment #1
liliplanet commentedHi 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.Comment #2
perkeI'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
Comment #3
jasont28 commentedI 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
Comment #4
liliplanet commentedIs there perhaps any update on this error please? This module is incomplete .. (and I sponsored the update :)
Comment #5
heyyo commentedSame error here. This module is useless to use roles as token in url aliases...
Comment #6
liliplanet commentedPlease Paul, any update would be greatly appreciated ..
Comment #7
liliplanet commentedPlease Paul, could you fix the error .. have been waiting for weeks and as you know, very important to my site ..
Comment #8
heyyo commentedI don't use this module anymore, I have made my own token, see this post for more information:
http://drupal.org/node/613938
Comment #9
liliplanet commentedHeyyo, 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?
Comment #10
pfaoclePlease try the line in question to:
if (is_array($roles) && array_key_exists($rid, $roles)) {Does this fix your problem?
Comment #11
liliplanet commentedHi 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
Comment #12
liliplanet commentedAttached is my view ..
Comment #13
sterwa commentedHi, it is not just the view that is the problem. After applying the patch in 10 I got the error message to dissapear, but generating autoaliases still does not pick up the token. I am using the following pattern for user accounts:
[lightest-role-id]/[user-raw]
And the paths I get generated look like "user/X" (for X being user ID).
I also tried tokens [heaviest-role], [heaviest-role-id] and [lightest-role] with no success. :/
Comment #14
lejon commentedHi,
I get the same error message as #1 and the token doesn't work.
Is there any maintenance on this module? Last version is 9 months old...
Comment #15
pedrofaria commentedHello guys...
i was taking a look at this module and fixed the problem....
The problem was that $object is not a user object, but a url alias object... obviously don't have role property...
so, i just fixed putting a user_load function....
Please, review it!
Comment #16
pedrofaria commentedComment #17
pfaocleThanks for the patch pedrofaria - will review when I can and continue the Token issue here: #534592: Tokens: [heaviest-role] and [lightest-role] show user id
@Liliplanet: the original array_key_exists error should have been fixed by #529216: Error on new user account submission. Marking this issue as a duplicate. Try the latest 6.x-1.x-dev release to see if it rectifies the problem.