Parse Error

I’m not even sure I am posting in the right forum, but here goes.

I am using Front Page Slide Show V 2.0 on my Joomla template. In the W3C CSS level 3 Validator it is showing a Parse Error //–> yet the mod seems to work fine.

This has been an issue for a very long time it seems & no one has come up with any answers. It seems that this particular php file calls the “CSS/JS code to the head.”

Here is that part of the php file.

	// ---------------------- Add CSS/JS code to the head ----------------------
	$modFPSShead = '
<!-- JoomlaWorks "Frontpage Slideshow" v2.0.0 starts here -->
<style type="text/css" media="all">
<!--
	@import "'.$mosConfig_live_site.'/modules/mod_fpss/mod_fpss/templates/'.$fpss_template.'/template_css.php?w='.$width.'&h='.$height.'&sw='.$sidebar_width.'";
//-->	
</style>
	';
	
	if (!$hide_nav) {
	$modFPSShead .= '
<!--[if lte IE 7]>
<style type="text/css" media="all">
	@import "'.$mosConfig_live_site.'/modules/mod_fpss/mod_fpss/templates/'.$fpss_template.'/template_css_ie.css";
</style>	
<![endif]-->
	';
	}
	
	if ($hide_nav) {
		$sidebar_width = 0;
		$modFPSShead .= '<style type="text/css" media="all">#navi-outer {display:none;}</style>';
	}
	
	if($optimizejs) {
		$modFPSShead .= '
<script type="text/javascript" src="'.$mosConfig_live_site.'/modules/mod_fpss/mod_fpss/engines/'.$engine.'-fpss.php"></script>
	';
	} else {
		if(!$disablelib) {
			$modFPSShead .= '
<script type="text/javascript" src="'.$mosConfig_live_site.'/modules/mod_fpss/mod_fpss/engines/'.$engine.'-comp.js"></script>
	';
		}
		$modFPSShead .= '
<script type="text/javascript" src="'.$mosConfig_live_site.'/modules/mod_fpss/mod_fpss/engines/'.$engine.'-fpss-comp.js"></script>
	';
	}
	
	$modFPSShead .= '
<script type="text/javascript">
<!--
	var fpssPlayText = "'._FPSS_MOD_PLAY.'";
	var fpssPauseText = "'._FPSS_MOD_PAUSE.'";
	var crossFadeDelay = '.$delay.';
	var crossFadeSpeed = '.$speed.';
	var fpssLoaderDelay = '.$loadingTime.';
	var navTrigger = "'.$rotateAction.'";
	var autoslide = '.$autoSlide.';
	';
	if ($engine=='mootools') {
	$modFPSShead .= '
	var CTRtransitionText = '.$mtCTRtransitionText.';	
	var CTRtext_effect = '.$mtCTRtext_effect.';
	';
	}
	$modFPSShead .= '
//-->
</script>	
<!-- JoomlaWorks "Frontpage Slideshow" v2.0.0 ends here -->
	';
	
	$mainframe->addCustomHeadTag($modFPSShead);
	
	?>
    
<!-- JoomlaWorks "Frontpage Slideshow" v2.0.0 starts here -->
<div id="fpss-outer-container"<?php if ($moduleclass_sfx) {echo ' class="'.$moduleclass_sfx.'"';} ?>>
    <div id="fpss-container">
        <div id="fpss-slider">
            <div id="slide-loading"></div>
            <div id="slide-wrapper">
                <div id="slide-outer">
					<?php echo $html; ?>
                </div>
            </div>
        </div>        
        <div id="navi-outer">
            <div id="pseudobox"></div>
            <div class="ul_container">
                <ul>        
            <?php if ($groupnav) { ?>
                <?php echo $navhtml; ?>
                
                    <li class="noimages"><a id="fpss-container_next" href="javascript:void(0);" onclick="showNext();clearSlide();" title="<?php echo _FPSS_MOD_NEXT; ?>"></a></li>
                    <li class="noimages"><a id="fpss-container_playButton" href="javascript:void(0);" onclick="ppButtonClicked();return false;" title="<?php echo _FPSS_MOD_PLAYPAUSE; ?>"><?php echo _FPSS_MOD_PAUSE; ?></a></li>
                    <li class="noimages"><a id="fpss-container_prev" href="javascript:void(0);" onclick="showPrev();clearSlide();" title="<?php echo _FPSS_MOD_PREV; ?>"></a></li>
                    <li class="clr"></li>
                
            <?php } else { ?>
            
                    <li class="noimages"><a id="fpss-container_prev" href="javascript:void(0);" onclick="showPrev();clearSlide();" title="<?php echo _FPSS_MOD_PREV; ?>">&laquo;</a></li>
                    <?php echo $navhtml; ?>
                    <li class="noimages"><a id="fpss-container_next" href="javascript:void(0);" onclick="showNext();clearSlide();" title="<?php echo _FPSS_MOD_NEXT; ?>">&raquo;</a></li>
                    <li class="noimages"><a id="fpss-container_playButton" href="javascript:void(0);" onclick="ppButtonClicked();return false;" title="<?php echo _FPSS_MOD_PLAYPAUSE; ?>"><?php echo _FPSS_MOD_PAUSE; ?></a></li>
                
            <?php } ?>
            
                </ul>
            </div>
        </div> 
        <div class="fpss-clr"></div>
    </div>
    <div class="fpss-clr"></div> 
</div>
<?php
} else {
    echo _FPSS_MOD_ALERT;
}

echo $crd;

?>

<!-- JoomlaWorks "Frontpage Slideshow" v2.0.0 ends here -->

I am not going to pretend to understand any of this. But, what I was able to ascertain from reading their forums, as well as users with the same parse error that it has something to do with the @import code at the very top:

<style type=“text/css” media=“all”>
<!–
@import “‘.$mosConfig_live_site.’/modules/mod_fpss/mod_fpss/templates/‘.$fpss_template.’/template_css.php?w=‘.$width.’&h=‘.$height.’&sw=‘.$sidebar_width.’”;
//–>
</style>
';

But, I don’t know why and I don’t know how to fix it. I appreciate if anyone understands this might have some help. :slight_smile:

Thank you.

In the <style> tags you can’t do a Javascript (or HTML) comment.

An acceptable comment in the <style> tags (CSS Comment) is

/comment text here/
Basically remove the red:)

<style type="text/css" media="all">
[color=red]<!--[/color]
@import "'.$mosConfig_live_site.'/modules/mod_fpss/mod_fpss/templates/'.$fpss_template.'/template_css.php?w='.$width.'&h='.$height.'&sw='.$sidebar_width.'";
[color=red]//--> [/color]
</style>

It’s invalid to have that bold section there.

Can you post the output of the PHP code as seen in a browser’s viewsource? Only the CSS stuff should be needed.

Sure - it shows up right before the </head> tag:

  <!-- JoomlaWorks "Frontpage Slideshow" v2.0.0 starts here -->
<style type="text/css" media="all"> 
<!--
	@import "http://www.aallsafe.com/1allsafert/modules/mod_fpss/mod_fpss/templates/Movies/template_css.php?w=705&h=230&sw=235";
//-->	
</style>
	
<!--[if lte IE 7]>
<style type="text/css" media="all">
	@import "http://www.aallsafe.com/1allsafert/modules/mod_fpss/mod_fpss/templates/Movies/template_css_ie.css";
</style>	
<![endif]-->
	
<script type="text/javascript" src="http://www.aallsafe.com/1allsafert/modules/mod_fpss/mod_fpss/engines/jquery-fpss.php"></script>
	
<script type="text/javascript"> 
<!--
	var fpssPlayText = "Play";
	var fpssPauseText = "Pause";
	var crossFadeDelay = 6000;
	var crossFadeSpeed = 1000;
	var fpssLoaderDelay = 800;
	var navTrigger = "mouseover";
	var autoslide = true;
	
//-->
</script>	
<!-- JoomlaWorks "Frontpage Slideshow" v2.0.0 ends here -->

As I said, it works fine. It is just not validating in W3C - instead it is showing this parse error. I just would like to be able to validate it if possible.

Did you just skip over my post…?

Thank you! That was it! :slight_smile:

You guys rock. :slight_smile:

You’re welcome :).

I didn’t. By the time I got back to the tab, you had already posted. Good catch.The SitePoint CSS reference http://reference.sitepoint.com/css/comments# does say that /* is allowed but // and <!-- are not.

The code in the PHP file may be a hack to hide it from older browsers (and most likely no longer needed, I hope. NS?? IE4??). As there is no comment anyway, you should probably just remove the comment tag lines.

No Mittineague I wasn’t talking to you lol. I was talking to the OP because she didn’t acknowledge my post :). You are good fine sir :).