Code problem... pls help!!!!

Everything to do with Joomla! 2.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
mgrabit
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 04, 2011 5:25 pm

Code problem... pls help!!!!

Post by mgrabit » Tue Oct 04, 2011 7:05 pm

hi all,
im new to joomla, but i managed to install Joomla on WAMP. I downloaded new temlate and like installed to my Joomla. After i clicked View Site is showing me new following error:

$slide){ ?>( ! ) Notice: Undefined variable: slide in C:\wamp\www\joomla\templates\themza_j17_01\index.php on line 57 Call Stack #TimeMemoryFunctionLocation 10.0005379968{main}( )..\index.php:0 20.53258227136JSite->render( )..\index.php:49 30.53508227568JDocumentHTML->parse( )..\application.php:253 40.53508227568JDocumentHTML->_fetchTemplate( )..\html.php:378 50.53578227920JDocumentHTML->_loadTemplate( )..\html.php:547 60.53738365208require( 'C:\wamp\www\joomla\templates\themza_j17_01\index.php' )..\html.php:488 " title="" alt="" />

Image




my code is

Code: Select all

<div id="top_menu"><div id="topnav"><jdoc:include type="modules" name="position-1" /></div></div>
        <div id="slider" class="nivoSlider">
        <? if(!is_array($slides)){ ?><img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/slide1.jpg" title="" alt="slide 1" />
        <img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/slide2.jpg" title="" alt="slide 2" />
        <img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/slide3.jpg" title="" alt="slide 3" />
        <? }else{foreach($slides as $k=>$slide){ ?><img src="<?php echo $slide ?>" title="<?=$slideCaptions[$k]?>" alt="" /><? }} ?>
line 57 is the last line...

Pls help
Thanks Matt
You do not have the required permissions to view the files attached to this post.

User avatar
duyet
Joomla! Guru
Joomla! Guru
Posts: 935
Joined: Wed Sep 21, 2011 8:21 pm
Location: on earth
Contact:

Re: Code problem... pls help!!!!

Post by duyet » Wed Oct 05, 2011 6:22 pm

I think this is an warning and not an error. This shows up because your php.ini was configured to show all error and warnings.

Go to the dir. where you have installed wamp, then open the dir. php, open the file php.ini file and search for the following:

Code: Select all

; Common Values:
;   E_ALL & ~E_NOTICE  (Show all errors, except for notices and coding standards warnings.)
;   E_ALL & ~E_NOTICE | E_STRICT  (Show all errors, except for notices)
;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
;   E_ALL | E_STRICT  (Show all errors, warnings and notices including coding standards.)
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
; http://php.net/error-reporting
error_reporting = E_ALL | E_STRICT
It's should be set to E_ALL | E_STRICT or E_ALL & ~E_DEPRECATED.

Not sure if this helps but worth trying ...

mgrabit
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 04, 2011 5:25 pm

Re: Code problem... pls help!!!!

Post by mgrabit » Wed Oct 05, 2011 9:38 pm

can u just tell me what line should i change...
Thanks

mgrabit
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 04, 2011 5:25 pm

Re: Code problem... pls help!!!!

Post by mgrabit » Wed Oct 05, 2011 9:44 pm

i changed:

Code: Select all

 Default Value: E_ALL & ~E_NOTICE
and still the same

User avatar
duyet
Joomla! Guru
Joomla! Guru
Posts: 935
Joined: Wed Sep 21, 2011 8:21 pm
Location: on earth
Contact:

Re: Code problem... pls help!!!!

Post by duyet » Thu Oct 06, 2011 3:46 am

Try the production value, ie

Code: Select all

error_reporting = E_ALL & ~E_DEPRECATED
the lines start with ';' are comments

mgrabit
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 04, 2011 5:25 pm

Re: Code problem... pls help!!!!

Post by mgrabit » Thu Oct 06, 2011 6:37 am

still doesn't work, my code looks like that:

Code: Select all

; Common Values:
;   E_ALL & ~E_NOTICE  (Show all errors, except for notices and coding standards warnings.)
;   E_ALL & ~E_NOTICE | E_STRICT  (Show all errors, except for notices)
;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
;   E_ALL | E_STRICT  (Show all errors, warnings and notices including coding standards.)
; Default Value: E_ALL & ~E_DEPRECATED
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
; http://php.net/error-reporting
error_reporting = E_ALL & ~E_DEPRECATED

User avatar
duyet
Joomla! Guru
Joomla! Guru
Posts: 935
Joined: Wed Sep 21, 2011 8:21 pm
Location: on earth
Contact:

Re: Code problem... pls help!!!!

Post by duyet » Fri Oct 07, 2011 12:31 pm

Last option ... restart your web server and see if it helps otherwise contact the template creator


Locked

Return to “Templates for Joomla! 2.5”