collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 365
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: I have errors in my error log.  (Read 6878 times)

0 Members and 1 Guest are viewing this topic.

Offline bluesinjid

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1
  • SP Version: 2.2.1
I have errors in my error log.
« on: May 20, 2009, 08:35:44 PM »
I use simple portal 2.2.1 and smf 2.0 rc1


Hi I get about 3 errors related to my site

Code: [Select]

/****/forum/Themes/default/SPortal2.template.php (body_above sub template - eval?)
Line: 341

and line: 339

and 330


Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: I have errors in my error log.
« Reply #1 on: May 20, 2009, 08:58:35 PM »
What other mods do you have installed? Could you disable eval()?

To disable eval(), open phpMyAdmin and click the SQL tab and use the following query:

Code: [Select]
REPLACE INTO smf_settings VALUES ('disableTemplateEval', 1);
By disabling eval(), the errors that have already occurred need to be propagated once again. The new errors that have appeared in the error log contain the correct file that PHP had a problem with.

To reactivate eval(), use the following query:

Code: [Select]
DELETE FROM smf_settings WHERE variable = 'disableTemplateEval';

Offline bluesinjid

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1
  • SP Version: 2.2.1
Re: I have errors in my error log.
« Reply #2 on: May 20, 2009, 09:43:50 PM »
alright seems to me its at my custom theme and regarding another mod, ajax chat!!!
Code: [Select]
File: /***/forum/Themes/Prof/index.template.php
Line: 330

The exact bad code is ==>330:     

   

   

if ($modSettings['enableChatBelowPM']){

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: I have errors in my error log.
« Reply #3 on: May 20, 2009, 09:50:51 PM »
Replace it with;

if (isset($modSettings['enableChatBelowPM'])) {

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: I have errors in my error log.
« Reply #4 on: May 21, 2009, 01:41:37 AM »
This code would work better, as it checks that the variable exists, and it checks its value as well. ;)
Code: [Select]
if (!empty($modSettings['enableChatBelowPM'])) {
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: I have errors in my error log.
« Reply #5 on: May 21, 2009, 11:39:18 AM »
Touché. :P

Offline bluesinjid

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1
  • SP Version: 2.2.1
Re: I have errors in my error log.
« Reply #6 on: May 21, 2009, 09:36:14 PM »
k thanks for that that part of the error is fixed :)

NOw  i get and error when ever you visit a topic

/------/forum/Themes/Prof/index.template.php
This is the code undefined ''title''
Code: [Select]

<span>', $button['title'], '</span>


Code: [Select]
: Undefined index: href
File: /////////forum/Themes/Prof/index.template.php
Line: 382

   

Code: [Select]
<a title="', $act, '" href="', $button['href'], '">

And just ofr reference heres the code around it

Code: [Select]
362:  // Show the menu up top. Something like [home] [help] [profile] [logout]...
363: function template_menu()
364: {
365:



global $context, $settings, $options, $scripturl, $txt, $modSettings;
366:
367:



echo '
368:



<div id="main_menu">
369:





<ul class="clearfix">';
370:
371:



foreach ($context['menu_buttons'] as $act => $button)
372:



{
373:





$classes = array();
374:





if (!empty($button['active_button']))
375:







$classes[] = 'active';
376:





if (!empty($button['is_last']))
377:







$classes[] = 'last';
378:





$classes = implode(' ', $classes);
379:





380:





echo '
381:







<li id="button_', $act, '"', !empty($classes) ? ' class="' . $classes . '"' : '', '>
==>382:









<a title="', $act, '" href="', $button['href'], '">
383:











<span>', $button['title'], '</span>
384:









</a>
385:







</li>';
386:



}
387:
388:



echo '
389:





</ul>
390:



</div>';
391: }
392:
393: // Generate a strip of buttons.
394: function template_button_strip($button_strip, $direction = 'top', $custom_td = '')
395: {
396:



global $settings, $context, $txt, $scripturl;
397:
398:



// Create the buttons...
399:



$buttons = array();
400:

foreach ($button_strip as $key => $value)
401:

if (!isset($value['test']) || !empty($context[$value['test']]))
402:

$buttons[] = '<a href="' . $value['url'] . '"' . (isset($value['active']) ? ' class="active"' : '') . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '><span>' . $txt[$value['text']] . '</span></a>';
/code]


Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: I have errors in my error log.
« Reply #7 on: May 21, 2009, 09:56:16 PM »
That's... weird. What does your Subs.php look like?

Offline Chit-Chat ChatterBox Boss

  • Semi Newbie
  • *
  • Posts: 9
  • SMF Version: 2 RC1
  • SP Version: 2.2
Re: I have errors in my error log.
« Reply #8 on: May 22, 2009, 02:17:47 PM »
I have this same problem.

Just found these 2 errors.

Code: [Select]
Undefined index: title
Apply Filter: Only show the errors from this file
File: /home/XXXXXX/public_html/Themes/default/index.template.php
Line: 643

Code: [Select]
Undefined index: href
Apply Filter: Only show the errors from this file
File: /home/XXXXXX/public_html/Themes/default/index.template.php
Line: 642

Area that contains line 642 & 643
Code: [Select]
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;

   echo '
   <div id="main_menu">
      <ul class="clearfix">';

   foreach ($context['menu_buttons'] as $act => $button)
   {
      $classes = array();
      if (!empty($button['active_button']))
         $classes[] = 'active';
      if (!empty($button['is_last']))
         $classes[] = 'last';
      $classes = implode(' ', $classes);
     
      echo '
         <li id="button_', $act, '"', !empty($classes) ? ' class="' . $classes . '"' : '', '>
            <a title="', $act, '" href="', $button['href'], '">
               <span>', ($button['active_button'] ? '<em>' : ''), $button['title'], ($button['active_button'] ? '</em>' : ''), '</span>
            </a>
         </li>';
   }

   echo '
      </ul>
   </div>';
}

Line 642
Code: [Select]
            <a title="', $act, '" href="', $button['href'], '">
Line 643
Code: [Select]
               <span>', ($button['active_button'] ? '<em>' : ''), $button['title'], ($button['active_button'] ? '</em>' : ''), '</span>

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: I have errors in my error log.
« Reply #9 on: May 22, 2009, 02:43:16 PM »
Well, here's a temp fix for you...

Code: [Select]
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;

   echo '
   <div id="main_menu">
      <ul class="clearfix">';

   foreach ($context['menu_buttons'] as $act => $button)
   {
      $classes = array();
      if (!empty($button['active_button']))
         $classes[] = 'active';
      if (!empty($button['is_last']))
         $classes[] = 'last';
      $classes = implode(' ', $classes);

      echo '
         <li id="button_', $act, '"', !empty($classes) ? ' class="' . $classes . '"' : '', '>
            <a title="', $act, '" href="', (isset($button['href']) ? $button['href'] : ''), '">
               <span>', ($button['active_button'] ? '<em>' : ''), (isset($button['title']) ? $button['title'] : ''), ($button['active_button'] ? '</em>' : ''), '</span>
            </a>
         </li>';
   }

   echo '
      </ul>
   </div>';
}

Offline Chit-Chat ChatterBox Boss

  • Semi Newbie
  • *
  • Posts: 9
  • SMF Version: 2 RC1
  • SP Version: 2.2
Re: I have errors in my error log.
« Reply #10 on: May 22, 2009, 02:47:39 PM »
Well, here's a temp fix for you...

Code: [Select]
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;

   echo '
   <div id="main_menu">
      <ul class="clearfix">';

   foreach ($context['menu_buttons'] as $act => $button)
   {
      $classes = array();
      if (!empty($button['active_button']))
         $classes[] = 'active';
      if (!empty($button['is_last']))
         $classes[] = 'last';
      $classes = implode(' ', $classes);

      echo '
         <li id="button_', $act, '"', !empty($classes) ? ' class="' . $classes . '"' : '', '>
            <a title="', $act, '" href="', (isset($button['href']) ? $button['href'] : ''), '">
               <span>', ($button['active_button'] ? '<em>' : ''), (isset($button['title']) ? $button['title'] : ''), ($button['active_button'] ? '</em>' : ''), '</span>
            </a>
         </li>';
   }

   echo '
      </ul>
   </div>';
}

By temp .. you mean its a get around, not a proper fix? Or it is a good fix?

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: I have errors in my error log.
« Reply #11 on: May 22, 2009, 02:50:49 PM »
Well, I'm not entirely sure to why those fields are empty in the first place-- it could be some add-on/mod that isn't functioning properly.

I just added checks to the values; so if its empty, it returns empty instead of returning nothing (and if it returned nothing, it would be 'undefined').

It's proper in the scheme of things, but I suspect a deeper issue than this.

Offline Chit-Chat ChatterBox Boss

  • Semi Newbie
  • *
  • Posts: 9
  • SMF Version: 2 RC1
  • SP Version: 2.2
Re: I have errors in my error log.
« Reply #12 on: May 22, 2009, 02:53:34 PM »
And it seemed to work..... Nothing was ever broken (as in everything worked fine) just those 2 errors popped up. Now we don't have those 2 errors and everything is working perfect so I will say its a good fix ;)

Offline bluesinjid

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1
  • SP Version: 2.2.1
Re: I have errors in my error log.
« Reply #13 on: May 22, 2009, 04:28:32 PM »
is this code for me too?

Offline Chit-Chat ChatterBox Boss

  • Semi Newbie
  • *
  • Posts: 9
  • SMF Version: 2 RC1
  • SP Version: 2.2
Re: I have errors in my error log.
« Reply #14 on: May 22, 2009, 04:31:17 PM »
I would say so seeing we have the same code and same problem.

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: I have errors in my error log.
« Reply #15 on: May 23, 2009, 10:13:30 PM »
Having a look over these issues, its likely that they are being caused by errors in your Subs.php files, where the context for the SMF 2 menu is setup.

@bluesinjid,
Could you please post your '/Themes/{themename}/index.template.php' and '/sources/Subs.php' files as attachments?

@Chit-Chat ChatterBox Boss,
Could you please post your '/sources/Subs.php' file as an attachment?

That edit posted by ccbtimewiz will stop the errors from showing, although it doesn't resolve the issue that is causing them. If you post your Subs.php file then I can try to get to the bottom of it.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline bluesinjid

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1
  • SP Version: 2.2.1
Re: I have errors in my error log.
« Reply #16 on: May 27, 2009, 06:10:25 PM »
 Alright heres my files and ive got these errors when i read a post in a topic ....


This is the exact error in
File: /*******/forum/Sources/SPortal2.php
Code: [Select]

<li>', sp_embed_image('dot'), (!empty($button['sub_buttons']) ? '</a>' : ''), ' <a title="', $button['title'], '" href="', $button['href'], '">', ($button['active_button'] ? '<strong>' : ''), $button['title'], ($button['active_button'] ? '</strong>' : ''), '</a>';

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: I have errors in my error log.
« Reply #17 on: May 31, 2009, 05:23:52 AM »
Is is just when you view a topic? Can you attach your Display.php and Display.template.php files here?
And slowly, you come to realize... It's all as it should be...

Offline bluesinjid

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1
  • SP Version: 2.2.1
Re: I have errors in my error log.
« Reply #18 on: May 31, 2009, 09:34:35 AM »
Yes this is when i view in a topic becasue i have simple portal in a side bar ive included my files

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: I have errors in my error log.
« Reply #19 on: June 02, 2009, 06:41:55 AM »
I'm not really sure what's causing the error but I highly doubt it is related to SimplePortal. Would you add this debugging code and report us what you see?

SPortal2.php

Code: (Find) [Select]
if (!empty($button['sub_buttons']))
Code: (Replace) [Select]
if (allowedTo('admin_forum') && (!isset($button['href']) || !isset($button['title'])))
echo '<pre>Problem: '; print_r($button); echo '</pre><br />';

if (!empty($button['sub_buttons']))

Note that only admins will see the debugging code.
And slowly, you come to realize... It's all as it should be...

Offline bluesinjid

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1
  • SP Version: 2.2.1
Re: I have errors in my error log.
« Reply #20 on: June 02, 2009, 05:22:52 PM »
Ah!!! I see the error

Problem: Array
(
    [active_button] => 1
)


How do I disable the active button, I do not want it

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: I have errors in my error log.
« Reply #21 on: June 03, 2009, 06:13:24 AM »
Subs.php

Code: (Find) [Select]
'Forum' => array(
Code: (Replace) [Select]
'forum' => array(
And slowly, you come to realize... It's all as it should be...