News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Error driving me insane!

Started by hcfwesker, January 25, 2011, 10:40:44 PM

Previous topic - Next topic

hcfwesker

I'm on SMF2 RC4  , my test site.  http://www.brawldomain.com/AASMF2/index.php

I searched, and found this topic that related to mine, but is a different situation for mine.

http://www.simplemachines.org/community/index.php?topic=408734.msg2847651#top

This is the error "IF" I have the Search Focus Drop Down MOd installed.

http://www.brawldomain.com/AASMF2/index.php?pretty;action=profile;user=Sora

2: Invalid argument supplied for foreach()

File: /home/brawldom/public_html/AASMF2/Themes/default/languages/SearchFocus.english.php (summary sub template - eval?)
Line: 101

&
http://www.brawldomain.com/AASMF2/index.php?action=teampage

8: Undefined index: tpm_footer

File: /home/brawldom/public_html/AASMF2/Themes/default/languages/SearchFocus.english.php (main sub template - eval?)
Line: 200




There is no line 101 in that file, and the MOD author assured me it wasn't from that MOD. 

So .. I uninstalled it to test, sure enough, with it NOT installed, I now get these errors



http://www.brawldomain.com/AASMF2/index.php?pretty;action=profile;user=Sora

2: Invalid argument supplied for foreach()

File: /home/brawldom/public_html/AASMF2/Themes/default/languages/Who.english.php (summary sub template - eval?)
Line: 101

&
http://www.brawldomain.com/AASMF2/index.php?action=teampage

8: Undefined index: tpm_footer

File: /home/brawldom/public_html/AASMF2/Themes/default/languages/TeamPage.english.php (main sub template - eval?)
Line: 200



These 2 Errors have baffled me for too long.  Coming to the experts.  I'll be happy to supply whatever more info you may need.


TheListener

I'd say the tpm footer is the team page mod.

Dream Portal is the best place to ask for help with that mod.

hcfwesker

Yeah, I think I can handle the team page one,  it's mainly the first error I posted, cause it shows up when viewing ANY link in the profile pages.

Illori

admin -> server settings disable evaluation of templates and then see what the new error message is.

hcfwesker

Still the same error whether it's checked or unchecked.

Illori

please check it and post the error message, also you can try clearing your error log first to be sure they are messages from after the change.

hcfwesker

I'm pretty good at looking at the time of the error, I always have my error log page, and the page the error is popping up on, refresh the page with the error, then refresh the error log, and check the time, and remove all errors in the log.


Checked the box again.  Cleared the error log, refreshed the profile page, checked the error log.

Time : Today at 06:21:12 PM
http://www.brawldomain.com/AASMF2/index.php?pretty;action=profile;user=Sora

2: Invalid argument supplied for foreach()

File: /home/brawldom/public_html/AASMF2/Themes/default/Profile.template.php
Line: 101

Illori

can you list all the mods you have installed?

hcfwesker

I really do appreciate you taking the time to help me.  I understand if it'll be awhile beofre you can get to this.  I've tried all my resources, and such, and this is the final error i need to get rid of before my test site is error free, and we can upgrade our site to smf2 rc4

1. Search Focus Dropdown 1.51 [ Uninstall ]
2. Stop Forum Spam 0.6 [ Uninstall ]
3. WYSIWYG Quick Reply 2.1 [ Uninstall ]
4. Separated Birthdays from Events 1.1.6 [ Uninstall ]
5. Todays Birthday RC1 - MColorLink 1.1 [ Uninstall ]
6. SMF Trader System 1.5 [ Uninstall ]
7. Order Custom Profile Fields 1.1 [ Uninstall ]
8. SA Shop 0.4.9 [ Uninstall ]
9. Hide Topic Replies 1.5 [ Uninstall ]
10. Team Page 1.1.6 [ Uninstall ]
11. Skype Integration 2.1.2 [ Uninstall ]
12. Separate Replies and Views Column 1.7 [ Uninstall ]
13. XarSmilies-1 1.0 [ Uninstall ]
14. Bookmarks 2.3 [ Uninstall ]
15. Activity in Profile 1.1 [ Uninstall ]
16. Reason For Editing Mod 2.3.2 [ Uninstall ]
17. Countdown BBCode 1.3 [ Uninstall ]
18. Top 10 Posters and Topic Starters Stats (Today, Week, Month, and Year) 2.5.1 [ Uninstall ]
19. Board Viewers Mod 1.2.1.1a [ Uninstall ]
20. Users Online Today 1.5.6 [ Uninstall ]
21. Member Awards 2.2.2 [ Uninstall ]
22. 6 Custom buttons / tabs with Sub Menus (4) 0.5 [ Uninstall ]
23. Pretty URLs 1.0RC2a [ Uninstall ]
24. SoLoSMiLeYS 1.0 [ Uninstall ]
25. Force Topic Read On Login Mod 2.1 [ Uninstall ]
26. Ultimate Profile 0.9.1 [ Uninstall ]
27. AjaxChat Integration 3.2.1 (modified for SMF 2 RC3) [ Uninstall ]
28. SMF Advanced Topic Prefix Mod 2.1.4 [ Uninstall ]
29. SMF Multi Quote 1.1.2 [ Uninstall ]
30. Shiny Smiley Icons 1.0 [ Uninstall ]
31. Member Color Link 3.0.8 [ Uninstall ]
32. SA Affiliates 3.3.5.4 [ Uninstall ]
33. cbi, 1.0 1.5.7 [ Uninstall ]
34. YouTube BBCode 2.6 [ Uninstall ]
35. Global Headers Footers 2.0 [ Uninstall ]
36. Spoiler BBCode 1.1.3 [ Uninstall ]
37. The Rules 1.3 [ Uninstall ]

Illori

can you attach your profile.template.php to your next post?

hcfwesker

My bad, I should have went ahead and done that already. 

The Joker helped me on one similar, that was being caused on the Ultimate Profile page.  And I think it had something to do with the custom profile fields.

thanx so mcuh, again, for your time :)

Illori

21.   Member Awards   2.2.2   [ Uninstall ]


foreach ($context['member']['awards'] as $award){


please post in the support thread for the Member Awards mod, the line above is 101 which is causing your error.

hcfwesker

#12
you are right.  i went to the MOD topic, and search the error in that topic ...  http://www.simplemachines.org/community/index.php?action=search2;search=Invalid+argument+supplied+for+foreach%28%29;topic=114701

I actually dont care for Awards to show on profile pages, so I may possibly remove the Awards code that edits that file; and see how that goes.

I'll see what I can find over there.  Thanx, Illori :)

EDIT::

Well, removing this part


// Show their awards?
echo '<br /><br />
<legend>', $txt['awards'], '</legend>';

// Awards!
echo '
<a href="', $scripturl, '?action=profile;sa=showAwards;u=', $context['member']['id'], '" title="', $txt['awards'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/award.gif" alt="' . $txt['awards'] . '" title="' . $txt['awards'] . '" border="0" />' : $txt['awards']), '</a>', '<br /><br />', '&nbsp;';


// Couldn't limit it in Load.php, so let's do it here.
foreach ($context['member']['awards'] as $award){
if($awards < $modSettings['awards_in_post'])
echo '
<a href="', $scripturl, $award['more'], '"><img src="', dirname($scripturl), $award['img'], '" alt="', $award['description'], '" title="', $award['description'], '" /></a> ';
$awards++;
}
echo '
</td>
</tr>';


Seems to have removed the error. 

Adish - (F.L.A.M.E.R)

I'll mark this as solved as it seems like it is resolved :P

Feel free to mark this as unsolved or open a new topic if you have any questions related to this issue.

Advertisement: