SimplePortal

Support => English Support => Topic started by: Eudemon on January 08, 2012, 09:02:42 PM

Title: keep getting these errors
Post by: Eudemon on January 08, 2012, 09:02:42 PM
keep getting these errors wherever i go

Code: [Select]
8: Undefined index: sp-positionFooter
File: /home/kumakun1/public_html/Sources/Admin.php
Line: 320

8: Undefined index: sp-positionHeader
File: /home/kumakun1/public_html/Sources/Admin.php
Line: 315

8: Undefined index: sp_shoutbox_prune
File: /home/kumakun1/public_html/Sources/Subs-Portal.php
Line: 987

8: Undefined index: sp_move
File: /home/kumakun1/public_html/Sources/Subs-Portal.php
Line: 988

8: Undefined index: sp_link

8: Undefined index: sp_all

added: see attachment
Title: Re: keep getting these errors
Post by: tomeh on January 09, 2012, 07:45:34 AM
The mistake may be an older version of smf or installation error
Title: Re: keep getting these errors
Post by: Eudemon on January 09, 2012, 06:53:12 PM
installation went smooth with no error
and im using the latest smf version
Title: Re: keep getting these errors
Post by: Old Fossil on January 09, 2012, 09:59:07 PM
Which language is used.

A link to the forum will also be useful.

 :nervous-happy:
Title: Re: keep getting these errors
Post by: Eudemon on January 09, 2012, 10:20:00 PM
english

here is the link
http://eudemon.org/index.php
Title: Re: keep getting these errors
Post by: Eudemon on January 12, 2012, 06:01:17 PM
ok here is what i find out

for example the
8: Undefined index: sp-positionFooter

if i open that file, it is this line
'footer' => array($txt['sp-positionFooter']),

which, is a $txt string

it is located in sportaladmin file in language folder
$txt['sp-positionFooter'] = 'Footer';
there is the line

but for some reason is still showing error??
if it is a permission problem, then why all the other txt strings are able to show
that just weird

btw i wrote my own chinese txt php file for "forum"
it is able to show in my other smf site but not this one, and the other one doesn't have these errors either

can you able to tell what might cause this happen?
Title: Re: keep getting these errors
Post by: Chen Zhen on January 12, 2012, 10:52:42 PM

You have your forum set to English UTF-8, correct ??
The installation should have included the utf-8 files.
Make sure your language directory contains both the regular & utf-8 language files for SimplePortal.

For your other language file (not related to SP) that is giving an issue, try adding the suffix of -utf8 to the file name.
ie. mylangfile-utf8.php

Clear your smf cache before testing any changes.
If this corrects the issue, tell us.


Title: Re: keep getting these errors
Post by: Eudemon on January 12, 2012, 11:47:37 PM
my forum is english   ISO-8859-1 not utf-8
and i even re-uploaded all the language files find in the install package, doesn't work
my other language files already have utf8 in the end, it is the same file i use for my other site that works

again all strings in the language file work except those few lines (i didn't modify it at all)
and i have cleared the cache, doesn't work
see attached image for another example
Title: Re: keep getting these errors
Post by: Chen Zhen on January 13, 2012, 07:51:50 AM

OK I see your forum is set at ISO-8859-1 in which case it should be using all the regular English language files (not utf-8).
I am assuming you are using SP 2.3.4 and installed it via your package manager.

In your example pic, only some $txt from the SPortalAdmin.english.php are not working?
Peculiar but there can be a few things to cause this.

Quote
btw i wrote my own chinese txt php file for "forum"
First try omitting the above & all its pertaining edits to see if it is somehow causing the issue.

 
Title: Re: keep getting these errors
Post by: Eudemon on January 13, 2012, 12:41:36 PM
Quote
In your example pic, only some $txt from the SPortalAdmin.english.php are not working?
correct

Quote
First try omitting the above & all its pertaining edits to see if it is somehow causing the issue.
problem is alrdy there before i add those file
my other site that has the same file has no problem

anyways, did that, problem still remain

im using smf 2.0.2 and sp 2.3.4
Title: Re: keep getting these errors
Post by: Chen Zhen on January 13, 2012, 02:54:06 PM

I have consulted another staff member regarding how the SimplePortal copyright is displayed on your forum and I have been informed that it is mandatory for the it to be visible.  I understand it is visible when a link is toggled but it is not always visible.

Until this is adjusted I regret to inform you that I can no longer provide you with support.

btw dziner studio may have similar conditions although I see it is a paid theme so I'm not positive.
Title: Re: keep getting these errors
Post by: Eudemon on January 13, 2012, 03:27:21 PM
it is adjusted now
Title: Re: keep getting these errors
Post by: Chen Zhen on January 13, 2012, 05:33:42 PM
it is adjusted now

Thank you.

Quote
if it is a permission problem, then why all the other txt strings are able to show
that just weird

btw i wrote my own chinese txt php file for "forum"
it is able to show in my other smf site but not this one, and the other one doesn't have these errors either

The other $txt variables from that same language file are working but the header & footer text is not?!

Just to clarify.. these 2 variables:
Code: [Select]
$txt['sp-positionHeader'] = 'Header';
$txt['sp-positionFooter'] = 'Footer';
... are present in the file but are undefined on the forum, whereas all other $txt seem to be working?

Also you stated it is working properly for you on another SMF installation.
Therefore imo another mod and/or edit is conflicting somehow.
 
Do you have a mod installed that alters the header & footer (top & bottom) of your pages?
I ask this because there are 2 divs on the page with id of header & footer.
Perhaps a mod is using those as a place marker & is somehow causing a problem when it finds that text on your admin page.

Temporarily change those $txt values to something different to test this theory.
ie.
Code: [Select]
$txt['sp-positionHeader'] = 'Top';
$txt['sp-positionFooter'] = 'Bottom';

\\Edit -> .. ahh that shouldn't cause an undefined so I doubt that will work.
atm I'm puzzled although somehow something is conflicting as I've stated.
There must be a mod or manual edit you did to this forum that differs from your other installation.
Title: Re: keep getting these errors
Post by: Eudemon on January 13, 2012, 08:12:27 PM
Quote
... are present in the file but are undefined on the forum, whereas all other $txt seem to be working?
those two are present in the file, i even tried re-upload a fresh copy from fresh download sp package, always those two that give errors
and all other seem to be working

ok here is a cool thing

i changed my theme to smf default and those errors stopped
what should i look for in my theme's files
Title: Re: keep getting these errors
Post by: Chen Zhen on January 13, 2012, 10:59:21 PM
those two are present in the file, i even tried re-upload a fresh copy from fresh download sp package, always those two that give errors
and all other seem to be working

ok here is a cool thing

i changed my theme to smf default and those errors stopped
what should i look for in my theme's files

Glad to hear you narrowed it down to the theme.
I can only test free dziner studio theme's & with those I have no issues.
Whereas with your paid theme I am unable to test it to figure out the issue.
Off hand I have no idea why only 2 variables from your language file refuse to hold their values only while using that specific theme.

I'll make 1 suggestion to try..

File: Sources / Admin.php
find:
Code: [Select]
loadLanguage('Admin');

replace with:
Code: [Select]
loadLanguage('Admin');
loadLanguage('SPortalAdmin');
 
Title: Re: keep getting these errors
Post by: Eudemon on January 14, 2012, 12:31:32 AM
did that, didn't work

im pretty sure a fresh install of the theme won't give error
but since i purchased the theme i have done so much customizations and i can't rly redo it (n my membership alrdy expired)
so i need to find out what producing the conflict

btw, can u able to find code changes for custom theme between smf version 2.0 and 2.0.2?
Title: Re: keep getting these errors
Post by: Chen Zhen on January 14, 2012, 09:35:23 AM
did that, didn't work

im pretty sure a fresh install of the theme won't give error
but since i purchased the theme i have done so much customizations and i can't rly redo it (n my membership alrdy expired)
so i need to find out what producing the conflict

btw, can u able to find code changes for custom theme between smf version 2.0 and 2.0.2?

I made something that will compare 2 php files and return any line code changes. 
To use it I suggest creating a temporary php block & use the preview command.
You'll have to upload both files .. ie. rename one to  file_old or something.

I put $boarddir in there in case you want to reference from the main dir for your files when you edit those entries below but I used $sourcedir in this example.
Code: [Select]
global $boarddir, $sourcedir;
$file1 = $sourcedir . '/somefile1.php';
$file2 = $sourcedir . '/somefile2.php';

if (@file_exists($file1) && @file_exists($file2))
{
$read1 = explode("\n", (@file_get_contents($file1)));
$read2 = explode("\n", (@file_get_contents($file2)));

foreach (array_difference($read1, $read2) as $diff_line)
echo $diff_line, '<br />';
}


function array_difference($array_a, $array_b)
{
$union_array = array_merge($array_a, $array_b);
$intersect_array = array_intersect($array_a, $array_b);
return array_diff($union_array, $intersect_array);
}
Title: Re: keep getting these errors
Post by: Eudemon on January 14, 2012, 06:36:35 PM
i made a copy and put it in my wamp server to test
i uninstalled every mod and put ur codes to a php file, added $themedir to it
and also moved a fresh copy of the theme into the theme folder
ran the php to compare both theme, didn't output anything

right now i use notepad++ open up both theme's files
n compare line by line, since i know some programming i know what my custom edits are and how they work
this just takes some time, i will let you know how it goes
Title: Re: keep getting these errors
Post by: Chen Zhen on January 14, 2012, 09:43:40 PM
i made a copy and put it in my wamp server to test
i uninstalled every mod and put ur codes to a php file, added $themedir to it
and also moved a fresh copy of the theme into the theme folder
ran the php to compare both theme, didn't output anything

right now i use notepad++ open up both theme's files
n compare line by line, since i know some programming i know what my custom edits are and how they work
this just takes some time, i will let you know how it goes

I tested the code I wrote a few times & it displays any code changes for me.
For your theme files try ie. $boarddir . '/Themes/THEME_NAME/FILE.php
Title: Re: keep getting these errors
Post by: Eudemon on January 15, 2012, 09:10:33 PM
here is what i did

for these past two days i went over every single line of all files in my theme, and also compare to a fresh copy
did not find any mod's "left over" or any code that might cast this
and also remove every single modz

then install only simple portal...
those errors show up again.......

btw $txt for these lines also give errors whenever i visit shoutbox
Title: Re: keep getting these errors
Post by: Chen Zhen on January 15, 2012, 09:52:34 PM
Make copies of those SimplePortal language files for all 7 languages you have available on that drop-down.

ie. SPortal.english.php ... SPortal.german.php  & SPortal.german-utf8.php

etc.. etc..

failing that:
 If you would like to grant me temp. ftp access so I can quickly look to see if it is indeed set up properly and/or try a few things to fix the issue. If you decide to go this route send me a PM with the info.
 


Title: Re: keep getting these errors
Post by: Eudemon on January 15, 2012, 10:47:52 PM
rly don't think that will solve the problem, and i myself use only english
anyways, tried, failed

ftp info pm'ed
Title: Re: keep getting these errors
Post by: Chen Zhen on January 15, 2012, 11:31:10 PM

Fixed.
You had SP 2.3.3 language files within that citiez theme language folder.

I deleted them (from the citiez theme's language folder).
The way SMF is set up is that is searches the current theme's folder for files & if they do not exist it uses files from the default theme folder.
Title: Re: keep getting these errors
Post by: Eudemon on January 15, 2012, 11:37:50 PM
confirmed error disappear
i was keep checking default theme's language folder bcuz
when i install sp in package manager it doesnt copy file to custom theme's language folder
i guess those files are bcuz old sp version does that

anyways

thank you so much for your help
underdog
Title: Re: keep getting these errors
Post by: Chen Zhen on January 16, 2012, 12:00:46 AM
confirmed error disappear
i was keep checking default theme's language folder bcuz
when i install sp in package manager it doesnt copy file to custom theme's language folder
i guess those files are bcuz old sp version does that

anyways

thank you so much for your help
underdog

Not a problem.
You have an unrelated undefined error from theme settings:
$settings['actual_theme_dir']

I am not sure what is causing it atm & can't look now because I no longer have ftp access. lol.

Anyhow this patch should work..
file: Sources/Load.php
find:
Code: [Select]
// Default language directories to try.
$language_directories = array(
$settings['default_theme_dir'] . '/languages',
$settings['actual_theme_dir'] . '/languages',
);

replace with:
Code: [Select]
if (empty($settings['actual_theme_dir']))
$settings['actual_theme_dir'] = $settings['default_theme_dir'];
// Default language directories to try.
$language_directories = array(
$settings['default_theme_dir'] . '/languages',
$settings['actual_theme_dir'] . '/languages',
);
Title: Re: keep getting these errors
Post by: Eudemon on January 16, 2012, 12:49:14 AM
sorry about that, i ran into another problem with my host n i lost my main ftp access
right after i created a temp ftp account for you
so i thought this account might be the problem so i delete right after you done with it

actually it isn't, the second backup i made somehow blocked my ip by my server firework and then somehow put up a security thinggy that somehow block my ftp bcuz it has same password as root etc etc
note: before that i was able to login with same info for months, w.e

i will test the edit right now
Title: Re: keep getting these errors
Post by: Eudemon on January 16, 2012, 01:07:56 AM
update
error seems disappeared, thank you again
SimplePortal 2.3.8 © 2008-2024, SimplePortal