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: 308
  • 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]

If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.

Author Topic: Undefined offset: 1 error  (Read 12511 times)

0 Members and 2 Guests are viewing this topic.

Offline leftezi

  • Semi Newbie
  • *
  • Posts: 17
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Undefined offset: 1 error
« on: January 03, 2010, 09:51:05 AM »
I have SMF 2.0 RC2 with SP 2.3.1 and getting very often this error in my error log:

8: Undefined offset: 1
file: ..... ..... /Themes/default/PortalAdminBlocks.template.php (eval?)
line: 32

In the line 32 is only a
Code: [Select]
</tr>';
I have only one mod installed: the YouTube BBCode

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Undefined offset: 1 error
« Reply #1 on: January 03, 2010, 08:12:39 PM »
Seeing as its an eval template error, the file/line given by php is not correct.

If you disable template eval, then you will get a real error message.

You can use the Disable Template eval mod to disable the use of eval in the templates: http://custom.simplemachines.org/mods/index.php?mod=2054
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 leftezi

  • Semi Newbie
  • *
  • Posts: 17
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Undefined offset: 1 error
« Reply #2 on: January 03, 2010, 10:16:10 PM »
I don't know how save that is. So i installed this in my home test server that was producing the same error.
After the mod installation - activation the error look like this:

8: Undefined offset: 1
file: C:/wamp/www/Themes/default/Portal.template.php
line: 32

line 32 in this file is:

Code: [Select]
==>32: 
<td id="sp_left"', !empty($modSettings['leftwidth']) ? ' width="' . $modSettings['leftwidth'] . '"' : '', $context['SPortal']['sides'][1]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : '', '>';

Offline leftezi

  • Semi Newbie
  • *
  • Posts: 17
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Undefined offset: 1 error
« Reply #3 on: January 03, 2010, 11:07:53 PM »
Just now i realized that this option is already installed in the SMF 2.0 RC2 version. There is no need for mod installation. Am i wrong?
In my home server the option appears twice after the mod installation. In the web-site appears only once without mod installation.

After the "disable template eval" option checked (in web server), the error look like this:

8: Undefined offset: 1
file: ... .../Themes/default/Portal.template.php
line: 32

line 32 in this file is:

Code: [Select]
==>32:  <td id="sp_left"', !empty($modSettings['leftwidth']) ? ' width="' . $modSettings['leftwidth'] . '"' : '', $context['SPortal']['sides'][1]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : '', '>';
i think is the same with this in home server but i posted it anyway just in case.

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Undefined offset: 1 error
« Reply #4 on: January 04, 2010, 08:58:41 AM »
That setting should not be there by default, its possible that your package manager made the edits twice. That can happen if you try to reload the page or if something else goes wrong.

Could you please attach your entire Themes/default/Portal.template.php file?
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 leftezi

  • Semi Newbie
  • *
  • Posts: 17
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Undefined offset: 1 error
« Reply #5 on: January 04, 2010, 09:03:10 AM »
I have Greek language in SMF (i don't know if this plays some role).

Here is my file attached.

Thank you.

Offline leftezi

  • Semi Newbie
  • *
  • Posts: 17
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Undefined offset: 1 error
« Reply #6 on: January 04, 2010, 09:07:33 AM »
You mean the option to disable eval with the checkbox should not be there by derault?

In the web-site i have never installed the mod and this was there already!!

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Undefined offset: 1 error
« Reply #7 on: January 20, 2010, 03:22:46 PM »
I can't think of a case which has index 1 unset. Can you attach your ./Sources/Subs-Post.php and ./index.php files here?
And slowly, you come to realize... It's all as it should be...

Offline leftezi

  • Semi Newbie
  • *
  • Posts: 17
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Undefined offset: 1 error
« Reply #8 on: January 21, 2010, 06:38:32 AM »
Here they are:

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Undefined offset: 1 error
« Reply #9 on: January 21, 2010, 12:10:03 PM »
I was probably too tired after writing a long school paper, sorry. I actually need Subs-Portal.php file.
And slowly, you come to realize... It's all as it should be...

Offline leftezi

  • Semi Newbie
  • *
  • Posts: 17
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Undefined offset: 1 error
« Reply #10 on: January 21, 2010, 02:49:33 PM »
Ok, no problem. Thanks for your time.
Here is the Subs-Portal.php:

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Undefined offset: 1 error
« Reply #11 on: January 21, 2010, 03:19:31 PM »
I see. Do you have blocks enabled when you are in the admin area?
And slowly, you come to realize... It's all as it should be...

Offline leftezi

  • Semi Newbie
  • *
  • Posts: 17
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Undefined offset: 1 error
« Reply #12 on: January 21, 2010, 07:46:58 PM »
Yes. They are enabled.
And i think you have right. The error in line 32 is produced when i am in the admin area and accessing in the block list.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Undefined offset: 1 error
« Reply #13 on: January 22, 2010, 08:16:16 AM »
Okay. I know what the issue is, but it would require quite a few changes to fix this. I'll file a bug report about this. I would suggest disabling blocks in admin areas until the next release.
And slowly, you come to realize... It's all as it should be...

Offline leftezi

  • Semi Newbie
  • *
  • Posts: 17
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Undefined offset: 1 error
« Reply #14 on: January 22, 2010, 08:20:58 AM »
Ah. I see.
About the block disabling in admin area:
Is there a danger for any damage or is recommended just to not produce the errors.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Undefined offset: 1 error
« Reply #15 on: January 22, 2010, 08:22:50 AM »
Nope, those errors won't cause any damage. It will just fill up your error log. You can disable blocks in certain areas through Admin > SimplePortal > Configuration > Block Settings area though.
And slowly, you come to realize... It's all as it should be...

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Undefined offset: 1 error
« Reply #16 on: January 22, 2010, 08:25:27 AM »
And slowly, you come to realize... It's all as it should be...

Offline leftezi

  • Semi Newbie
  • *
  • Posts: 17
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Undefined offset: 1 error
« Reply #17 on: January 22, 2010, 08:38:39 AM »
Ok, thank you.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Undefined offset: 1 error
« Reply #18 on: January 22, 2010, 08:51:56 AM »
My pleasure. ;)
And slowly, you come to realize... It's all as it should be...

Offline MultiformeIngegno

  • Full Member
  • ***
  • Posts: 127
  • Gender: Male
  • SMF Version: None
  • SP Version: None
Re: Undefined offset: 1 error
« Reply #19 on: February 11, 2010, 06:25:15 PM »
Can you post the 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: Undefined offset: 1 error
« Reply #20 on: February 11, 2010, 10:57:52 PM »
Why not just remove the array reset, [SiNaN]?

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Undefined offset: 1 error
« Reply #21 on: February 27, 2010, 05:42:26 AM »
Can you post the fix? :)

I guess you could live without blocks in the admin areas until 2.3.2 or 2.4 version is relased, since I'm too lazy to post the necessary edits.

Why not just remove the array reset, [SiNaN]?

Array reset? You mean $context['SPortal'] = array(); in sportal_init() function? That won't change anything since sportal_init() is called before sportal_admin_block_list(). The issue is both functions use $context['SPortal']['sides'] index. The easiest way to fix this is to change the index used in the admin area.
And slowly, you come to realize... It's all as it should be...