EzPortal - Portal Software for Forums

EzPortal Forums => Support => Topic started by: Eddy Matthews on November 11, 2009, 03:51:20 pm

Title: Undefined index
Post by: Eddy Matthews on November 11, 2009, 03:51:20 pm
I've just upgraded to SMF 2.0 RC2, and EzPortal is giving hundreds of "Undefined index" errors.... Mainly "is_guest" and "session_id".

Regards
Eddy
Title: Re: Undefined index
Post by: lumumba on November 11, 2009, 05:52:36 pm
+1
Sorry for my english ;)

if user is guest =>

Quote
EzPortal is giving hundreds of "Undefined index" errors...

Erorrs:
Code: [Select]
http://subaru.spb.ru/index.php?action=dlattach;topic=26.0;attach=138;image
8: Undefined index: session_id
Файл: /home/www/z122587/htdocs/Sources/EzPortal2.php
Строка: 2143

http://subaru.spb.ru/index.php?action=dlattach;topic=26.0;attach=140;image
8: Undefined index: images_url
Файл: /home/www/z122587/htdocs/Sources/EzPortal2.php
Строка: 2128
...

part of /Sources/EzPortal2.php:
Code: [Select]
';


$context['html_headers'] .= 'EzPortalSaveBlockState(ezBlockID,ezCollapseState,isBlock);';

$context['html_headers'] .= '
if (myImage.src == "' . $settings['images_url'] . '/collapse.gif")
myImage.src = "' . $settings['images_url'] . '/expand.gif";
else
myImage.src = "' . $settings['images_url'] . '/collapse.gif";

}';


$context['html_headers'] .= '
function EzPortalSaveBlockState(ezBlock,ezState,isBlock)
{
var tempImage = new Image();
if (isBlock == 1)
tempImage.src = smf_scripturl + (smf_scripturl.indexOf("?") == -1 ? "?" : "&") + "action=ezportal;sa=blockstate;blockid=" + ezBlock + ";state=" + ezState + ";sesc=" + "' . $context['session_id'] . '" +  ";" + (new Date().getTime());
else
tempImage.src = smf_scripturl + (smf_scripturl.indexOf("?") == -1 ? "?" : "&") + "action=ezportal;sa=columnstate;columnid=" + ezBlock + ";state=" + ezState + ";sesc=" + "' . $context['session_id'] . '" +  ";" + (new Date().getTime());

}';

$context['html_headers'] .= '
// ]]></script>';


P.S. solution from me for "is_guest"

Code: [Select]
if (!$context['user']['is_guest'])replace with
Code: [Select]
if (!$user_info['is_guest'])=> no more errors like "Undefinded index is_guest"
Title: Re: Undefined index
Post by: EzPortal on November 11, 2009, 07:04:44 pm
Fixed those errors with a minor update which is released.

Minor Update 0.3.3a fixed some undefined errors SMF 2.0 RC2
Title: Re: Undefined index
Post by: Eddy Matthews on November 12, 2009, 02:49:46 am
Thanks vbgamer, that seems to have cured it....

Regards
Eddy
Title: Re: Undefined index
Post by: lumumba on November 15, 2009, 12:59:02 pm
Thanks!

New trouble when i create the new page:

Code: [Select]
http://subaru.spb.ru/index.php?action=ezportal;sa=addpage
8: Undefined index: admin_menu_name
File: /home/www/z122587/htdocs/Sources/EzPortal2.php
Line: 1420

part of /Sources/EzPortal2.php:

Code: [Select]
1415:  function EzPortalPageManagerTabs()
1416: {
1417: global $txt, $context, $txt, $scripturl;
1418:
1419:
==>1420: $context[$context['admin_menu_name']]['tab_data'] = array(
1421: 'title' => $txt['ezp_tab_pagemanager'],
1422: 'description' =>  $txt['ezp_tab_pagemanager_desc'],
1423: 'tabs' => array(
1424: 'pagemanager' => array(
1425: 'description' => '',
1426: ),
1427:
1428:
1429:
1430: ),
1431: );
1432: