Go Back   Pligg Forum > Pligg Development > Bug Report
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-26-2007, 10:12 PM
bichopro's Avatar
bichopro bichopro is offline
New Pligger
 
Join Date: Feb 2007
Posts: 9
Downloads: 26
Uploads: 0
Thanks: 1
Thanked 4 Times in 2 Posts
Exclamation god/admin profile problem

only to id user 1 (Admin/god)

when i try to click in my own profile the database send me this message

Quote:
Warning: Invalid argument supplied for foreach() in /home/wi180055/public_html/beta/libs/utils.php on line 406
invalid username or userid in get_avatar
the four line is the 406 - begin with foreach...

PHP Code:
// using this because i'm not sure if (array)$user will work in php 4
    // i'm not sure if we even need all this but it makes my code work 
    
$array = array();
    foreach (
$result as $key=>$value) {
        if (
is_object($value)) {
            
$array[$key]=object_2_array($value);
        }
        elseif (
is_array($value)) {
            
$array[$key]=object_2_array($value);
        }
        else {
            
$array[$key]=$value;
        }
    }
    return 
$array;


function 
phpnum() { 
any solution?

I use 9.5 with the login patch (2) and this is so rare because i don't touch the database.
sorry my so bad inglish

Update: all user profile in my site is good, but when a user try to watch my profel (user id 1 god admin) see the error
__________________

Last edited by bichopro : 06-27-2007 at 02:15 AM. Reason: update
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-27-2007, 12:52 PM
bichopro's Avatar
bichopro bichopro is offline
New Pligger
 
Join Date: Feb 2007
Posts: 9
Downloads: 26
Uploads: 0
Thanks: 1
Thanked 4 Times in 2 Posts
this user have same problem when click in second page from the popular page

I've got a strange error
__________________
Reply With Quote
  #3 (permalink)  
Old 06-27-2007, 05:29 PM
bichopro's Avatar
bichopro bichopro is offline
New Pligger
 
Join Date: Feb 2007
Posts: 9
Downloads: 26
Uploads: 0
Thanks: 1
Thanked 4 Times in 2 Posts
i try the solution of this user but nothing happens

Can help me please?
__________________
Reply With Quote
  #4 (permalink)  
Old 07-08-2007, 10:28 PM
betagirl betagirl is offline
Pligg Donor
 
Join Date: Mar 2007
Posts: 85
Downloads: 13
Uploads: 0
Thanks: 16
Thanked 14 Times in 10 Posts
invalid username or userid in get_avatar

Quote:
Originally Posted by bichopro View Post
i try the solution of this user but nothing happens

Can help me please?
I'm getting this same error. I removed all comments, votes, links and then the users from the table (all were faux data). Then I get this error for 3 users (God, and two others) when trying to access the profiles for each:

invalid username or userid in get_avatar

I also then went into the friends table, to update (remove) any ids associated with deleted users. I still get the error.

I also emptied the cache.

I'd rather not repopulate the database with bad data. Is there another fix for this? Can anyone tell me where the code that generates the error is so I can check the SQL statment?

Thanks!
Reply With Quote
  #5 (permalink)  
Old 07-08-2007, 11:21 PM
betagirl betagirl is offline
Pligg Donor
 
Join Date: Mar 2007
Posts: 85
Downloads: 13
Uploads: 0
Thanks: 16
Thanked 14 Times in 10 Posts
Quote:
Originally Posted by betagirl View Post
I'm getting this same error. I removed all comments, votes, links and then the users from the table (all were faux data). Then I get this error for 3 users (God, and two others) when trying to access the profiles for each:

invalid username or userid in get_avatar

I also then went into the friends table, to update (remove) any ids associated with deleted users. I still get the error.

I also emptied the cache.

I'd rather not repopulate the database with bad data. Is there another fix for this? Can anyone tell me where the code that generates the error is so I can check the SQL statment?

Thanks!
OK, not sure what I did that, but instead of restoring the database, I went through every table and deleted any reference to a user_id that I had deleted. That seemed to fix it. (so in addition to the above tables, I removed any records referring to deleted users in trackbacks, friends and pageviews).

Profile pages work fine now.
Reply With Quote
The Following User Says Thank You to betagirl For This Useful Post:
  #6 (permalink)  
Old 08-08-2007, 03:42 AM
ryanshyper ryanshyper is offline
Casual Pligger
 
Join Date: Mar 2007
Posts: 48
Downloads: 6
Uploads: 0
Thanks: 4
Thanked 1 Time in 1 Post
betagirl - i had the same problem after using a modified killspam - this took care of it -thank you.
Reply With Quote
  #7 (permalink)  
Old 08-09-2007, 01:59 AM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,073
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
Modified killspam is here: Spamkill? More like Spambruise
Reply With Quote
  #8 (permalink)  
Old 08-09-2007, 08:25 PM
ryanshyper ryanshyper is offline
Casual Pligger
 
Join Date: Mar 2007
Posts: 48
Downloads: 6
Uploads: 0
Thanks: 4
Thanked 1 Time in 1 Post
FYI - I was also receiving a 406 error when reading private messages because they were coming from user 1 (god) in the welcome_privmsg_main and I had deleted him. After switching this value to antoher user it was resolved.
Reply With Quote
  #9 (permalink)  
Old 08-10-2007, 01:34 AM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,073
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
This was your only problem with the modified killspam? Then I will try it.
Reply With Quote
  #10 (permalink)  
Old 08-10-2007, 08:08 PM
ryanshyper ryanshyper is offline
Casual Pligger
 
Join Date: Mar 2007
Posts: 48
Downloads: 6
Uploads: 0
Thanks: 4
Thanked 1 Time in 1 Post
I was basically getting a 406 when I went to some of the user profiles. I had to remove any references to the deleted users in every table they were referenced in the database. The reference to the welcome_privmsg_main may is only relevant if you killspam God.
Reply With Quote
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Tabbed Menu and Profile!!! Just about done... Genghis General Help 1 05-11-2007 02:43 AM
Formating problem with IE7 in user profile holspar General Help 3 03-28-2007 11:55 PM
No pagination for stories in profile kbeeveer46 Bug Report 0 08-07-2006 12:22 AM
How can I add new fields to user profile gragland General Help 0 07-17-2006 11:03 PM
Problem form doesn't work! nabil Bug Report 1 04-01-2006 07:53 PM


LinkBacks Enabled by vBSEO 3.0.0