Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Kirby on March 26, 2004, 02:17:36 PM

Title: profile view bug
Post by: Kirby on March 26, 2004, 02:17:36 PM
when viewing a persons profile, this apears at the top of the screen
Quote
Notice: Undefined index: profile_areas in /home/simple/security/Sources/Profile.php on line 226
Notice: Undefined index: profile_areas in /home/simple/security/Sources/Profile.php on line 226

I also got a "hacking attempt" message once just for logging in o_O
Title: Re: profile view bug
Post by: Owdy on March 26, 2004, 02:18:23 PM
Works just fine here
Title: Re: profile view bug
Post by: Kirby on March 26, 2004, 02:19:16 PM
weird..... it just went away  :o
Title: Re: profile view bug
Post by: Owdy on March 26, 2004, 02:21:28 PM
weird..... it just went away  :o
Might been just some update or something
Title: Re: profile view bug
Post by: [Unknown] on March 27, 2004, 12:11:46 AM
Probably ran into some file being uploaded, ie. Profile.php.

-[Unknown]
Title: Re: profile view bug
Post by: [Unknown] on March 28, 2004, 05:45:45 PM
Fixed it...

-[Unknown]
Title: Re: profile view bug
Post by: 7summits on March 30, 2004, 03:12:56 AM
Hey [Unknown]

how did you fix this? Just noticed I have the same problem on my site which I upgraded yesterday. Uploaded all the files (twice) and ran upgrade.php.

But when looking at a profile as a guest, I get the error message. How can I fix it?
Check yourself: http://7summits.com/forum/index.php?action=profile;u=1

Thanks,
7s
Title: Re: profile view bug
Post by: [Unknown] on March 30, 2004, 08:32:23 AM
I don't remember off hand, it was on that line - can you quote the line giving the error?

-[Unknown]
Title: Re: profile view bug
Post by: 7summits on March 30, 2004, 09:12:04 AM
This is the error message on screen:
Notice: Undefined index: profile_areas in /home/summits/public_html/forum/Sources/Profile.php on line 226
Notice: Undefined index: profile_areas in /home/summits/public_html/forum/Sources/Profile.php on line 226

This is the line in question (with line before (comment) and line after added for clarification):
Code: [Select]
// This is here so the menu won't be shown unless it's actually needed.
if (count($context['profile_areas']) == 1 || (count($context['profile_areas']) == 2 && isset($context['profile_areas']['profile_action']['areas']['send_pm']) && count($context['profile_areas']['profile_action']['areas']) == 1))
$context['profile_areas'] = array();
Thanks!
Title: Re: profile view bug
Post by: [Unknown] on March 30, 2004, 09:16:42 AM
Make it:

if (empty($context['profile_areas']) || count($context['profile_areas']) == 1 || (count($context['profile_areas']) == 2 && isset($context['profile_areas']['profile_action']['areas']['send_pm']) && count($context['profile_areas']['profile_action']['areas']) == 1))

-[Unknown]
Title: Re: profile view bug
Post by: 7summits on March 30, 2004, 09:42:13 AM
yep, that worked, thanks.
Title: Re: profile view bug
Post by: gregy on March 31, 2004, 03:26:32 PM
hmm .. little more errors i have :)

Notice: Undefined index: profileInfo in /home/web/domain.com/www/Sources/Profile.php on line 166
Notice: Undefined index: summary in /home/web/domain.com/www/Sources/Profile.php on line 168
Notice: Undefined index: statPanel in /home/web/domain.com/www/Sources/Profile.php on line 169
Notice: Undefined index: showPosts in /home/web/domain.com/www/Sources/Profile.php on line 170
Notice: Undefined index: trackUser in /home/web/domain.com/www/Sources/Profile.php on line 178
Notice: Undefined index: trackIP in /home/web/domain.com/www/Sources/Profile.php on line 179
Notice: Undefined index: showPermissions in /home/web/domain.com/www/Sources/Profile.php on line 180
Notice: Undefined index: profileEdit in /home/web/domain.com/www/Sources/Profile.php on line 188
Notice: Undefined index: account in /home/web/domain.com/www/Sources/Profile.php on line 193
Notice: Undefined index: personal in /home/web/glasbenicvek.com/www/Sources/Profile.php on line 197
Notice: Undefined index: forumProfile in /home/web/domain.com/www/Sources/Profile.php on line 198
Notice: Undefined index: theme2u in /home/web/domain.com/www/Sources/Profile.php on line 199
Notice: Undefined index: notification in /home/web/domain.com/www/Sources/Profile.php on line 200
Notice: Undefined index: pmprefs in /home/web/domain.com/www/Sources/Profile.php on line 201
Notice: Undefined index: profileAction in /home/web/domain.com/www/Sources/Profile.php on line 210
Notice: Undefined index: profileBanUser in /home/web/domain.com/www/Sources/Profile.php on line 218
Notice: Undefined index: deleteAccount in /home/web/domain.com/www/Sources/Profile.php on line 222
Notice: Undefined index: menu_item_selected in /home/web/domain.com/www/Sources/Profile.php on line 234

everything else seems to work  :P
Title: Re: profile view bug
Post by: [Unknown] on March 31, 2004, 11:27:44 PM
You seem to have lots of missing strings from your language files...

-[Unknown]
Title: Re: profile view bug
Post by: gregy on April 01, 2004, 06:06:22 AM
hmm .. where should be i mean in which file should be following strings?

$txt['smf100']
$txt['smf102']
$txt['smf103']
$txt['pswd3']
$txt['pswd4']

these seems to be left out .. don't know how .. i made normal upgrade with default theme ...

thanx
Title: Re: profile view bug
Post by: [Unknown] on April 01, 2004, 06:53:42 AM
Profile.english.php, please try a detailed version check.

-[Unknown]
Title: Re: profile view bug
Post by: gregy on April 01, 2004, 07:24:12 AM
strange .. this file Profile.english is in languages .. also the configuration of forum is total messed up .. like no style.css ...

you can check out at www.glasbenicvek.com and to see profile use Luka/sc2utp

tenx
Title: Re: profile view bug
Post by: [Unknown] on April 01, 2004, 07:51:28 AM
It looks like you're using a non-standard language file... are you sure that Profile.LANGUAGE.php exists?

-[Unknown]
Title: Re: profile view bug
Post by: gregy on April 01, 2004, 09:05:57 AM
yep .. i'm sure .. i have translated (almost all words) english files .. didn't changed anything .. just translated files ... and one more thing .. if user tries to request forgotten password (on login page) there are also missing language strings and when i add them into index.english.php!!! they are shown on forgotten pass page !?
Title: Re: profile view bug
Post by: gregy on April 02, 2004, 02:13:31 AM
Hi!

still not working .. but i did some researches :)

in Profile there are missing language strings ... it searches for i.e. TXT 86 .. this string IS in Profile.language.php ... but it is not displayed on profile page.

When i enter txt86 string into index.english.php it is displayed on the profile page ... but without any .css style ... pure text .. big ...

what could be wrong?
Title: Re: profile view bug
Post by: Dove on April 02, 2004, 03:52:36 AM
Ok I applied the fix, and now a non registered can view a profile - that worked but now I get this error, when I login and view my own profile:

this at the top of the page:

Notice: Undefined index: menu_item_selected in /homepages/34/mydatabase/htdocs/smf/Sources/Profile.php on line 234

and under the profile:

Notice: Undefined index: menu_item_selected in /homepages/34/mydatabase/htdocs/smf/Themes/default/Profile.template.php on line 29 Summary

when I put the original profile.php back this goes away, but I am back to the error:

Notice: Undefined index: profile_areas in /homepages/34/mydatabase/htdocs/smf/Sources/Profile.php on line 226

when a non registered person trys to view a profile


Thanks

Title: Re: profile view bug
Post by: [Unknown] on April 02, 2004, 05:55:28 AM
This is the line in question (with line before (comment) and line after added for clarification):
Code: [Select]
// This is here so the menu won't be shown unless it's actually needed.
if (count($context['profile_areas']) == 1 || (count($context['profile_areas']) == 2 && isset($context['profile_areas']['profile_action']['areas']['send_pm']) && count($context['profile_areas']['profile_action']['areas']) == 1))
$context['profile_areas'] = array();

Change that exact segment of code to this:

Code: [Select]
// This is here so the menu won't be shown unless it's actually needed.
if (empty($context['profile_areas']) || count($context['profile_areas']) == 1 || (count($context['profile_areas']) == 2 && isset($context['profile_areas']['profile_action']['areas']['send_pm']) && count($context['profile_areas']['profile_action']['areas']) == 1))
$context['profile_areas'] = array();

-[Unknown]
Title: Re: profile view bug
Post by: Dove on April 02, 2004, 10:26:35 AM
Thanks - worked. :)
Title: Re: profile view bug
Post by: gregy on April 04, 2004, 05:24:35 AM
i also fixed my error with profile .. i did an upgrade again .. and suddenly all is fine :)

tanx