Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: meemzo on September 16, 2014, 12:42:37 PM

Title: 8: Undefined index: curr_time Error
Post by: meemzo on September 16, 2014, 12:42:37 PM
8: Undefined index: curr_time

Getting this error in the IP error logs with every visitor, guest and members, and every page load.  Does anyone know what this means?
Title: Re: 8: Undefined index: curr_time Error
Post by: Arantor on September 16, 2014, 12:46:28 PM
Any other information on the error? You should get more information in the error log than that.
Title: Re: 8: Undefined index: curr_time Error
Post by: meemzo on September 16, 2014, 12:56:31 PM
It gives the error and the page visited, which is every page they visit.

8: Undefined index: curr_time
?action=post;quote=101557;topic=362.0    Today at 11:29 AM

8: Undefined index: curr_time
?action=post;quote=101557;topic=362.0    Today at 11:28 AM

8: Undefined index: curr_time
?action=post;quote=101557;topic=362.0    Today at 11:28 AM

8: Undefined index: curr_time
?/topic,362.msg101557.html          Today at 11:25 AM

8: Undefined index: curr_time
?/topic,362.msg101551.html          Today at 11:25 AM

I left off the member name and IP.
Title: Re: 8: Undefined index: curr_time Error
Post by: Ninja ZX-10RR on September 16, 2014, 12:58:56 PM
And also the file, that was the information needed -_-
Title: Re: 8: Undefined index: curr_time Error
Post by: Kindred on September 16, 2014, 01:00:45 PM
... The file...    AND the line number of the error.
Title: Re: 8: Undefined index: curr_time Error
Post by: Ninja ZX-10RR on September 16, 2014, 01:01:54 PM
Yeah I thought it was obvious along with the file xD
Title: Re: 8: Undefined index: curr_time Error
Post by: meemzo on September 16, 2014, 01:50:57 PM
Sorry, what file do you speak of?
Title: Re: 8: Undefined index: curr_time Error
Post by: Arantor on September 16, 2014, 02:02:19 PM
The one listed in the error log as being the cause of the error...
Title: Re: 8: Undefined index: curr_time Error
Post by: meemzo on September 16, 2014, 03:22:20 PM
Ok, it took a minute to sink in that there was an error "log".  I was seeing it in the who's online, ip log. Duh.  Anyway here is what it says:

http://thewalkingrebels.com/index.php?action=admin;area=logs;sa=errorlog;desc;filter=error_type;value=undefined_vars

8: Undefined index: curr_time

File: /home4/rebels/public_html/Themes/default/Alerts.template.php (body_above sub template - eval?)
Line: 226
Title: Re: 8: Undefined index: curr_time Error
Post by: Ninja ZX-10RR on September 16, 2014, 03:52:53 PM
Go to Forum » Administration Center » Server Settings » General and check "Disable evaluation of templates" and then post the error again, it will be different ;)
I suspect that it's a bug in a mod anyway...
Title: Re: 8: Undefined index: curr_time Error
Post by: meemzo on September 16, 2014, 04:43:12 PM
Newest error after disabling template errors.

http://thewalkingrebels.com/index.php?action=search
8: Undefined index: curr_time
File: /home4/rebels/public_html/Themes/blackrain_202/index.template.php
Line: 226
Title: Re: 8: Undefined index: curr_time Error
Post by: Ninja ZX-10RR on September 16, 2014, 04:53:27 PM
That's an error related to a theme, you should request support for that in the theme support topic. Unfortunately in this case the author passed away... (http://www.simplemachines.org/community/index.php?topic=516486.0 R.I.P. Crip :'() Please attach the file so that someone might have a look...
Title: Re: 8: Undefined index: curr_time Error
Post by: Deaks on September 16, 2014, 05:10:48 PM
More importantly what mods do you have installed??
Title: Re: 8: Undefined index: curr_time Error
Post by: Ninja ZX-10RR on September 16, 2014, 05:36:36 PM
If the error comes from a mod when he attaches the file and you see those strings you should be able to determine if those strings are part of a mod or not ;)
Title: Re: 8: Undefined index: curr_time Error
Post by: Deaks on September 16, 2014, 05:52:01 PM
the fact of matter the mod is effecting more than the theme ... for example its showing also in a non default file ... helpin fix the issue overall will stop any issues in future as in the long term not just the short!
Title: Re: 8: Undefined index: curr_time Error
Post by: Ninja ZX-10RR on September 16, 2014, 06:07:42 PM
I don't see any difference between what I said and what you said in the end :)
Title: Re: 8: Undefined index: curr_time Error
Post by: Arantor on September 16, 2014, 07:08:06 PM
All we know is that it is a file from the theme, it could be a rogue mod, it could be the theme. Getting the user's actual file is by far the best way to investigate...
Title: Re: 8: Undefined index: curr_time Error
Post by: Deaks on September 16, 2014, 07:34:51 PM
Well if we know the mod the support topic may already have the answer ..
Title: Re: 8: Undefined index: curr_time Error
Post by: Arantor on September 16, 2014, 07:36:58 PM
Eh, this is why I asked for the code itself because if I can see the code, I can give you a good idea of what mod it probably is just from the code.

If in doubt the code will always show you what's going on ;)
Title: Re: 8: Undefined index: curr_time Error
Post by: Ninja ZX-10RR on September 16, 2014, 09:03:11 PM
That's what I said in reply #11 and #13, basically. Lol :) I'll wait for the file despite I know that the big guy above me will handle it way better >_<
Title: Re: 8: Undefined index: curr_time Error
Post by: meemzo on September 19, 2014, 02:13:13 PM
Where do I find the file that needs to be uploaded here?
Title: Re: 8: Undefined index: curr_time Error
Post by: Ninja ZX-10RR on September 19, 2014, 02:58:00 PM
On the server that is hosting you, access it via cPanel or either FTP, doesn't matter as long as you access it :P
Title: Re: 8: Undefined index: curr_time Error
Post by: meemzo on September 19, 2014, 03:28:43 PM
The template file I assume.
Title: Re: 8: Undefined index: curr_time Error
Post by: Ninja ZX-10RR on September 19, 2014, 03:39:30 PM
Now it's up to some coder since I can't fix it. It will be fixed anyway :)
Title: Re: 8: Undefined index: curr_time Error
Post by: meemzo on September 19, 2014, 04:34:24 PM
Looks like the bug is in the display user name and time current time line:

// Display user name and time.
   echo '
      <ul id="greeting_section" class="reset titlebg2">
         <li id="time" class="smalltext floatright">
            ', $context['curr_time'], '
            <img id="upshrink" src="', $settings['images_url'], '/upshrink.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
         </li>';

   if ($context['user']['is_logged'])
      echo '
         <li id="name">', $txt['hello_member_ndt'], ' <em>', $context['user']['name'], '</em></li>';
   else
      echo '
         <li id="name">', $txt['hello_guest'], ' <em>', $txt['guest'], '</em></li>';

   echo '
      </ul>';

   if ($context['user']['is_logged'] || !empty($context['show_login_bar']))
      echo '
      <div id="user_section" class="bordercolor"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
         <div class="windowbg2 clearfix">';

   if (!empty($context['user']['avatar']))
      echo '
            <div id="myavatar">', $context['user']['avatar']['image'], '</div>';


Found it but I have no idea what it means.  :P
Title: Re: 8: Undefined index: curr_time Error
Post by: Ninja ZX-10RR on September 19, 2014, 04:57:51 PM
I have an idea but I can't code a fix for it :/
Title: Re: 8: Undefined index: curr_time Error
Post by: Night09 on September 19, 2014, 05:14:03 PM
Not 100% sure but Edit:

', $context['curr_time'], '

to say

', $context['current_time'], '
Title: Re: 8: Undefined index: curr_time Error
Post by: Illori on September 19, 2014, 05:24:42 PM
Quote from: Night09 on September 19, 2014, 05:14:03 PM
Not 100% sure but Edit:

', $context['curr_time'], '

to say

', $context['current_time'], '

according to my files that should fix it.
Title: Re: 8: Undefined index: curr_time Error
Post by: meemzo on September 19, 2014, 06:29:03 PM
Thank you Ninja ZX-10RR for lighting the fire under my butt to get this fixed.  And also just the overall support the last few days.  My offer for a box of chocolates still stand.  ;)

And thank you Night09 that did the trick.  ;D
Title: Re: 8: Undefined index: curr_time Error
Post by: Ninja ZX-10RR on September 19, 2014, 06:59:19 PM
Go on with the other problems as there are many others, the database collation will be particularly annoying to explain you how to get rid of that... But it can be done :) and also the other errors, even if I didn't have a look at all of them, I was never asked to do it so I couldn't do it since it is your stuff and I have no rights to touch it unless you say so.

And by the way you're welcome :D how could you send me a box of chocolate anyway? :P Well I would eat that with my gf ^^