SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: Sudhakar on October 16, 2008, 04:19:27 PM

Title: Error Msg - 8: Undefined variable: scripturl
Post by: Sudhakar on October 16, 2008, 04:19:27 PM
I have installed in smf 2.0.4, the version i use 2.0.5 classic.

It shows this error ever click made on Portal Page.

8: Undefined variable: scripturl
Apply Filter: Only show the errors from this file
File: /home/itacumen/public_html/discuss/Themes/default/SPortal2.template.php (main sub template - eval?)
Line: 18

8: Undefined variable: scripturl
Apply Filter: Only show the errors from this file
File: /home/itacumen/public_html/discuss/Themes/default/SPortal2.template.php (main sub template - eval?)
Line: 19

8: Undefined variable: scripturl
Apply Filter: Only show the errors from this file
File: /home/itacumen/public_html/discuss/Themes/default/SPortal2.template.php (main sub template - eval?)
Line: 20

....
..
.
.
.
.
.
.

..
...

8: Undefined variable: scripturl
Apply Filter: Only show the errors from this file
File: /home/itacumen/public_html/discuss/Themes/default/SPortal2.template.php (main sub template - eval?)
Line: 31
Title: Re: Error Msg - 8: Undefined variable: scripturl
Post by: ???1031 on October 17, 2008, 12:36:40 AM
So did you insert some custom blocks? :X
I looked into the Files where i think this could be missing but i did not find one "$scripturl" that is not global included... (But i will look after the work agian).
I thinks it's missed somewhere on one of the language files, it could be possible that also a other mod could produce that error (for example ad sense).

Is only the Simple Portal installed?

Bye
DIN1031
Title: Re: Error Msg - 8: Undefined variable: scripturl
Post by: Sudhakar on October 21, 2008, 02:27:48 PM
I have activated simple portal for 3 minutes,

All errors (732) | Undefined (732)
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

http://discuss.itacumens.com/index.php?http://discuss.itacumens.com/
Apply Filter: Only show the errors with the same message
8: Undefined variable: scripturl
Apply Filter: Only show the errors from this file
File: /home/itacumen/public_html/discuss/Themes/default/SPortal2.template.php (main sub template - eval?)
Line: 29

http://discuss.itacumens.com/index.php?
Apply Filter: Only show the errors with the same message
8: Undefined variable: scripturl
Apply Filter: Only show the errors from this file
File: /home/itacumen/public_html/discuss/Themes/default/SPortal2.template.php (main sub template - eval?)
Line: 29
Title: Re: Error Msg - 8: Undefined variable: scripturl
Post by: ???1031 on October 22, 2008, 12:36:42 AM
... that's why i ask... did you've installed some other mods beside SPortal... And this only happen if you start SPortal?
(I hope you want tell me that... after you said you enabled it for 3 minutes...).

Do you use any custom php blocks?

And i looked again at the file, but at this possition there is no $scripturl used at that possition...
Code: [Select]
echo '
</td>';
}

echo '
<td valign="top">';

Bye
DIN1031
Title: Re: Error Msg - 8: Undefined variable: scripturl
Post by: Sudhakar on October 23, 2008, 10:29:42 AM
Yes, i have custom php blocks and here goes the information,

PHP Block - Site Navigations -

Custom PHP - Me and SiNaN, and copied from my old 1.1.6 board.


Code: [Select]
$show_menu = 1; //Set 0 to not show
$menu_label = ''; //Define the block name

if($show_menu)
{
echo '
<!-- Menu Block -->
<div class="tborder">
<table class="bordercolor" width="100%">
<tr class="catbg">
<td style="padding: 5px;">', $menu_label, '</td>
</tr>
<tr class="windowbg">
<td>';
echo '
<font  size="1"><b>Navigation</b></font><br><hr>
<img src="Themes/default/images/menu/home.gif" /> <a href="http://itacumens.com/">Home</a></font><br>
<img src="Themes/default/images/menu/forum.gif" /> <font size="2"><a href="' . $scripturl . '?action=forum">Forum</a></font><br>
<img src="Themes/default/images/menu/blog.gif" height="16" width="16"/> <font size="2"><a href="' . $scripturl . '?action=felblog">Blogs</a></font><br>
<img src="Themes/default/images/menu/chat.gif" /> <font size="2"><a href="' . $scripturl . '?action=chat">Chat</a></font><br>
<img src="Themes/default/images/menu/downloads.gif" /> <font size="2"><a href="' . $scripturl . '?action=downloads">Downloads</a></font><br>
<img src="Themes/default/images/menu/gallery.gif" /> <font size="2"><a href="' . $scripturl . '?action=gallery">Gallery</a></font><br>
<br><font size="1"><b>Statistics</b></font><br><hr>
<img src="Themes/default/images/menu/calendar.gif" /> <font size="2"><a href="' . $scripturl . '?action=calendar">Calendar</a></font><br>
<img src="Themes/default/images/menu/members.gif" /> <font size="2"><a href="' . $scripturl . '?action=mlist">Member List</a></font><br>
<img src="Themes/default/images/menu/online.gif" /> <font size="2"><a href="' . $scripturl . '?action=who">Who\'s Online</a></font><br>
<img src="Themes/default/images/menu/stats.gif" /> <font size="2"><a href="' . $scripturl . '?action=stats">Statistics</a></font><br>
<br><font size="1"><b>Services</b></font><br><hr>
<img src="Themes/default/images/menu/search.gif" /> <font size="2"><a href="' . $scripturl . '?action=search">Search</a></font><br>
<img src="Themes/default/images/menu/staff.gif" /> <font size="2"><a href="' . $scripturl . '?action=staff">Site Staff</a></font><br>
<img src="Themes/default/images/menu/contact_us.gif" /> <font size="2"><a href="' . $scripturl . '?action=contact">Contact Us</a></font><br>
';

echo ' </td>
</tr>
</table>
</div>
<br />';

}

2nd PHP Block - Random Poll -

Custom PHP -


Code: [Select]
global $boarddir;

require_once($boarddir . '/SSI.php');

ssi_recentPoll();

3rd there is a HTML Block, Site Statistics - Recent Visitors

Code: [Select]
<script type="text/javascript" src="http://feedjit.com/serve/?bc=FFFFFF&tc=494949&brd1=336699&lnk=494949&hc=336699&ww=160"></script><noscript><a href="http://feedjit.com/">Feedjit Live Blog Stats</a></noscript>
Title: Re: Error Msg - 8: Undefined variable: scripturl
Post by: ???1031 on October 24, 2008, 01:04:19 AM
PHP Block - Site Navigations -

Custom PHP - Me and SiNaN, and copied from my old 1.1.6 board.


Code: [Select]
$show_menu = 1; //Set 0 to not show
$menu_label = ''; //Define the block name

if($show_menu)
{
echo '
<!-- Menu Block -->
<div class="tborder">
<table class="bordercolor" width="100%">
<tr class="catbg">
<td style="padding: 5px;">', $menu_label, '</td>
</tr>
<tr class="windowbg">
<td>';
echo '
<font  size="1"><b>Navigation</b></font><br><hr>
<img src="Themes/default/images/menu/home.gif" /> <a href="http://itacumens.com/">Home</a></font><br>
<img src="Themes/default/images/menu/forum.gif" /> <font size="2"><a href="' . $scripturl . '?action=forum">Forum</a></font><br>
<img src="Themes/default/images/menu/blog.gif" height="16" width="16"/> <font size="2"><a href="' . $scripturl . '?action=felblog">Blogs</a></font><br>
<img src="Themes/default/images/menu/chat.gif" /> <font size="2"><a href="' . $scripturl . '?action=chat">Chat</a></font><br>
<img src="Themes/default/images/menu/downloads.gif" /> <font size="2"><a href="' . $scripturl . '?action=downloads">Downloads</a></font><br>
<img src="Themes/default/images/menu/gallery.gif" /> <font size="2"><a href="' . $scripturl . '?action=gallery">Gallery</a></font><br>
<br><font size="1"><b>Statistics</b></font><br><hr>
<img src="Themes/default/images/menu/calendar.gif" /> <font size="2"><a href="' . $scripturl . '?action=calendar">Calendar</a></font><br>
<img src="Themes/default/images/menu/members.gif" /> <font size="2"><a href="' . $scripturl . '?action=mlist">Member List</a></font><br>
<img src="Themes/default/images/menu/online.gif" /> <font size="2"><a href="' . $scripturl . '?action=who">Who\'s Online</a></font><br>
<img src="Themes/default/images/menu/stats.gif" /> <font size="2"><a href="' . $scripturl . '?action=stats">Statistics</a></font><br>
<br><font size="1"><b>Services</b></font><br><hr>
<img src="Themes/default/images/menu/search.gif" /> <font size="2"><a href="' . $scripturl . '?action=search">Search</a></font><br>
<img src="Themes/default/images/menu/staff.gif" /> <font size="2"><a href="' . $scripturl . '?action=staff">Site Staff</a></font><br>
<img src="Themes/default/images/menu/contact_us.gif" /> <font size="2"><a href="' . $scripturl . '?action=contact">Contact Us</a></font><br>
';

echo ' </td>
</tr>
</table>
</div>
<br />';

}

Bug found ;)

Code: [Select]
global $scripturl;
$show_menu = 1; //Set 0 to not show
$menu_label = ''; //Define the block name

if($show_menu)
{
echo '
<!-- Menu Block -->
<div class="tborder">
<table class="bordercolor" width="100%">
<tr class="catbg">
<td style="padding: 5px;">', $menu_label, '</td>
</tr>
<tr class="windowbg">
<td>';
echo '
<font  size="1"><b>Navigation</b></font><br><hr>
<img src="Themes/default/images/menu/home.gif" /> <a href="http://itacumens.com/">Home</a></font><br>
<img src="Themes/default/images/menu/forum.gif" /> <font size="2"><a href="' . $scripturl . '?action=forum">Forum</a></font><br>
<img src="Themes/default/images/menu/blog.gif" height="16" width="16"/> <font size="2"><a href="' . $scripturl . '?action=felblog">Blogs</a></font><br>
<img src="Themes/default/images/menu/chat.gif" /> <font size="2"><a href="' . $scripturl . '?action=chat">Chat</a></font><br>
<img src="Themes/default/images/menu/downloads.gif" /> <font size="2"><a href="' . $scripturl . '?action=downloads">Downloads</a></font><br>
<img src="Themes/default/images/menu/gallery.gif" /> <font size="2"><a href="' . $scripturl . '?action=gallery">Gallery</a></font><br>
<br><font size="1"><b>Statistics</b></font><br><hr>
<img src="Themes/default/images/menu/calendar.gif" /> <font size="2"><a href="' . $scripturl . '?action=calendar">Calendar</a></font><br>
<img src="Themes/default/images/menu/members.gif" /> <font size="2"><a href="' . $scripturl . '?action=mlist">Member List</a></font><br>
<img src="Themes/default/images/menu/online.gif" /> <font size="2"><a href="' . $scripturl . '?action=who">Who\'s Online</a></font><br>
<img src="Themes/default/images/menu/stats.gif" /> <font size="2"><a href="' . $scripturl . '?action=stats">Statistics</a></font><br>
<br><font size="1"><b>Services</b></font><br><hr>
<img src="Themes/default/images/menu/search.gif" /> <font size="2"><a href="' . $scripturl . '?action=search">Search</a></font><br>
<img src="Themes/default/images/menu/staff.gif" /> <font size="2"><a href="' . $scripturl . '?action=staff">Site Staff</a></font><br>
<img src="Themes/default/images/menu/contact_us.gif" /> <font size="2"><a href="' . $scripturl . '?action=contact">Contact Us</a></font><br>
';

echo ' </td>
</tr>
</table>
</div>
<br />';

}

We do not global include anything on a php block ;)
(Add only the global include on the first line)

Bye
DIN1031
Title: Re: Error Msg - 8: Undefined variable: scripturl
Post by: Sudhakar on October 25, 2008, 04:24:49 PM
yes,

The modification worked well and now my simple portal is working fine.

Thanks a lot.  :applause:
Title: Re: Error Msg - 8: Undefined variable: scripturl
Post by: ???1031 on October 28, 2008, 02:19:43 AM
If you have the next time the porblem with scripturl :) and added a new php block.
Add to the block at the first line the global $scripturl; than this error will disapear :).

Bye
DIN1031
SimplePortal 2.3.8 © 2008-2024, SimplePortal