Products category intermittently doesn't generate menu

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
JimboDavies
Forum Members
Forum Members
Posts: 130
Joined: Fri Feb 25, 2011 3:58 pm

Products category intermittently doesn't generate menu

Post by JimboDavies »

I have had a persistent problem with http://www.stormforce.biz, that I hoped would be fixed by moving from shared hosting to VPS (I hoped it was a memory/resources issue).

Frequently, when the page is produced, the menus generated by the product module simply do not appear. This results in our menu system looking like this:
Image

It should in fact look like this:
Image

I notice that when the menus are working, so is the cart summary in the top right hand corner of the screen, but when the menus fail, the cart summary fails to. The menu problem is obviously the biggest issue, as our customers frequently can't get to our product pages.

Any pointers on where to look for the problem, and how, would be gratefully received. I'm no php expert, but I have seen threads before where people have been able to put logging/diagnostic code in to drill down into the problem further - I'm happy to do this but don't know where to start.

The specific menu code looks like this (the whole thing is quite long, so this is just a snippet):

Code: Select all

... it starts
{if $node->menutext == 'Powerboat Training'}<li><a href='{$node->url}'>{$node->menutext}</a>
<div class='sbar'>
<ul>
<li><a href='http://www.stormforce.biz/categories/powerboating/powerboat-training.html'>Powerboat Up to 10m</a>
<div class='mbar'>
<div class='col_2'>
<h3>Beginner/Improver</h3>
{Products category='Power / Powerboat / Beginner' sortby='weight'}
</div>
<div class='col_2'>
<h3>Intermediate</h3>
{Products category='Power / Powerboat / Intermediate' sortby='weight'}
</div>
<div class='col_2'>
<h3>Advanced</h3>
{Products category='Power / Powerboat / Advanced' sortby='weight'}
</div>
</div></li>
<li><a href='http://www.stormforce.biz/categories/powerboating/motor-cruising-courses.html'>Motor Cruising over 10m</a>
<div class='mbar'>
<div class='col_2'>
<h3>Beginner & Intermediate Courses</h3>
{Products category='Power / Motor / Beginner & Intermediate' sortby='weight'}
</div>
<div class='col_2'>
<h3>Advanced</h3>
{Products category='Power / Motor / Advanced' sortby='weight'}
</div>
</div></li>
<li><a href='http://www.stormforce.biz/categories/powerboating/pwc-jetski-courses.html'>PWC (JetSki)</a>
<div class='mbar'>
<div class='col_2'>
<h3>Training Courses</h3>
{Products category='Power / PWC / Training' sortby='weight'}
</div>
<div class='col_2'>
<h3>Instructor Courses</h3>
{Products category='Power / PWC / Instructor' sortby='weight'}
</div>
</div></li>
<li><a href='http://www.stormforce.biz/categories/powerboating/power-fast-track.html'>Power Fast-Track</a>
<div class='mbar'>
<div class='col_2'>
<h3>Driver</h3>
{Products category='Power / Fast Track / Driver' sortby='weight'}
</div>
<div class='col_2'>
<h3>Instructor</h3>
{Products category='Power / Fast Track / Instructor' sortby='weight'}
</div>
</div></li>
<li><a href='http://www.stormforce.biz/categories/powerboating/power-instructor.html'>Power Instructor</a>
<div class='mbar'>
<div class='col_2'>
<h3>Powerboat</h3>
{Products category='Power / Instructor / Powerboat' sortby='weight'}
</div>
<div class='col_2'>
<h3>Motor Boat</h3>
{Products category='Power / Instructor / Motor' sortby='weight'}
</div>
<div class='col_2'>
<h3>PWC</h3>
{Products category='Power / Instructor / PWC' sortby='weight'}
</div>
</div></li>
<li><a href='http://www.stormforce.biz/categories/powerboating/power-charter.html'>Charter</a>
<div class='mbar'>
<div class='col_2'>
<h3>Bareboat Charter</h3>
{Products category='Sailing / Charter / Bareboat' sortby='weight'}
</div>
<div class='col_2'>
<h3>Skippered Charter</h3>
{Products category='Power / Charter / Skippered' sortby='weight'}
</div>
<div class='col_2'>
<h3>Events</h3>
{Products category='Sailing / Charter / Events' sortby='weight'}
</div>
</div></li>
</ul>
</div>
{elseif $node->menutext == 'Caribbean & Greece'}
... it goes on
My page template looks like this:

Code: Select all

{strip}
{content assign='get_content'}
{/strip}
<!DOCTYPE html>
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
{metadata}
{CGFeedMaker action='autodiscovery' feed='news'}
{ScriptDeploy groupID='1' Stype='CSS'} 
{ScriptDeploy groupID='2' Stype='CSS'}
<title>{title} | {sitename} - RYA Training and charter for sailing, power boating, navigation, Sea Survival, STCW, PWC, First Aid and more</title>
{literal}
<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="favicon.ico" />
<!--[if lt IE 7]>
<__script__ defer type="text/javascript" src="pngfix.js"></__script>
<![endif]-->
<!--[if IE 6]>
<style>
body {behavior: url("csshover3.htc");}
</style>
<![endif]-->
{/literal}
</head>
</__body>
<div id="container">
<__script__ type="text/javascript" src="http://www.stormforce.biz/min/?f=scripts/jquery-1.7.1.min.js,scripts/jquery.capSlide.js,scripts/jquery.liScroll.js"></__script>
<__script__ type="text/javascript" src="http://www.stormforce.biz/min/?f=scripts/stepcarousel.js"></__script>
<div id="logo"><a href="http://www.stormforce.biz/">Stormforce Coaching, RYA, HSE, MCA Training, Racing and Sailing.</a>Sail and Power Training, Charter and Holidays</div>
{menu template='TopLinks_2011' start_element='2.1' show_root_siblings='1'}
<div id="search">
<p><a href="mailto:coaching@stormforce.biz?Subject=Web%20Header%20Enquiry">coaching@stormforce.biz</a>&nbsp;023 80 231 122</p>
<form action="http://www.stormforce.biz/" id="cntnt01moduleform_1" method="get" class="cms_form"><div class="hidden"><input type="hidden" name="mact" value="Search,cntnt01,dosearch,0" /><input type="hidden" name="cntnt01returnid" value="15" /></div>
<p>I"m looking for  <input type="text" class="searchboxup" id="cntnt01searchinput" name="cntnt01searchinput" size="20" maxlength="50" />
<input type="submit" name="submit" id="srch" />
</p></form>
</div>
{Cart action='mycart'}
{menu template='CSS_Mega_2011' start_element='3.1' show_root_siblings='1' number_of_levels='1'}<div id="content">
{global_content name='MainPanels'}
<div id="leftcol">
{$get_content}
</div>
<div id="rightcol">
{FormBuilder form='MainContact'}
<div id="quizbox">
<h3>Test your Knowledge!</h3>
<p>Fancy trying your luck on one of our Quizzes?</p>
<a href="http://www.stormforce.biz/information-pages/quizzes.html">Take a Quiz!</a>
</div>
</div>
{news detailpage='news' number='4' category='General,Sailing,Powerboating,Racing,Motor Cruising,Shorebased'}
<div id="accreditations">
<h3>Accreditations:</h3>
<img src="http://img.stormforce.biz/accs.png" alt="Royal Yachting Association, MCA, British Marine Federation, British Water Ski, HSE, RYA OnBoard, Superyacht UK, Marine Leisure Association, British Sub Aqua Club Logos" width="960" height="85" /></div>
</div>
<div id="mail_list"><h3>Join our Mailing List</h3>
{literal}
<form method="post" name="inputForm" action="http://www.graphicmail.co.uk/RWCode/subscribe.asp?SiteID=15429&SID=6">
<input type="hidden" name="SID" value="6">
<input type="hidden" name="ReturnURL" value="">
<input type="hidden" name="Resize" value="1">
<input type="hidden" name="Mode" value="update">
<input type="hidden" name="ResultMode" value="">
<input type="hidden" name="HitID" value="0">
<input type="hidden" name="OldEmail" value="">
<input type="hidden" name="EmailChange" value="0">
<input type="hidden" name="EmailID" value="0">
<input type="text" name="Col1" size="40" id="FName" value="First Name" onfocus="if(this.value=='First Name'){this.value=''};" onblur="if(this.value==''){this.value='First Name'};" />
<input type="text" name="Col2" size="40" id="LName" value="Last Name" onfocus="if(this.value=='Last Name'){this.value=''};" onblur="if(this.value==''){this.value='Last Name'};" /> 
<input type="text" name="Email" size="40" id="eadd" value="E-Mail Address" onfocus="if(this.value=='E-Mail Address'){this.value=''};" onblur="if(this.value==''){this.value='E-Mail Address'};" />
		<input type="submit" value="Submit" id="JoinNow" />
</form>
{/literal}
</div>
<div id="social_media"><h3>Connect With Us</h3>
<p class="buttons">
<a href="http://www.facebook.com/#!/pages/Stormforce-Coaching/13770283547" id="facebook">Become a Facebook Fan</a>
<a href="http://twitter.com/Stormforce_UK" id="twitter">Find us on Twitter</a>
<a href="https://foursquare.com/v/stormforce-coaching/4e736592483b4dd0be2ef929" id="foursquare">Connect with us on Foursquare</a>
<a href="http://www.stormforce.biz/feeds/news.rss" id="rss">Follow our RSS feed</a>
</p>
<p>Shamrock Quay Marina, William Street, Southampton, Hants, SO14 5QL</p><p><strong>Telephone:</strong> 02380 231 122<br /><strong>E-mail:</strong> <a href="mailto:coaching@stormforce.biz?Subject=Contact%20from%20Website%20(footer)">coaching@stormforce.biz</a></p></div>
<div id="quicklinks"><h3>Quick Links</h3>
{menu template='Simple_Menu_2011' start_element='3.1' show_root_siblings='1' number_of_levels='1'}
	<p>&copy; Stormforce Coaching 2001 - 2012</p>
	</div>
</div>
{literal}
<__script__ type="text/javascript">
		$().ready(function(){
			$(".newsticker").liScroll({showControls:true});
		});
	</__script>
        <__script__ type="text/javascript">
            $(function() {
            $("[id^='capslide_img_cont']").capslide({
            caption_color   : 'white',
            caption_bgcolor : '#005ca7',
            overlay_bgcolor : 'orange',
            border          : '',
            showcaption     : true
    });


            });
        </__script>
<__script__ type="text/javascript">
stepcarousel.setup({
	galleryid: "mygallery", //id of carousel DIV
	beltclass: "belt", //class of inner "belt" DIV containing all the panel DIVs
	panelclass: "panel", //class of panel DIVs each holding content
	autostep: {enable:true, moveby:1, pause:4000},
	panelbehavior: {speed:1000, wraparound:true, wrapbehavior:"pushpull", persist:true},
	defaultbuttons: {enable: true, moveby: 1, leftnav: ["leftbutton.png", -18, 140], rightnav: ["rightbutton.png", -22, 140]},
	statusvars: ["statusA", "statusB", "statusC"], //register 3 variables that contain current panel (start), current panel (last), and total panels
	contenttype: ["inline"] //content setting ["inline"] or ["ajax", "path_to_external_file"]
})
</__script>
{/literal}
{ga id="UA-22557035-1"}
<__body>
</__html>
Anybody got any tips or advice?
Last edited by JimboDavies on Wed Nov 14, 2012 11:40 am, edited 1 time in total.
JimboDavies
Forum Members
Forum Members
Posts: 130
Joined: Fri Feb 25, 2011 3:58 pm

Re: Products module intermittently doesn't generate menu

Post by JimboDavies »

So, I've tried experimenting with caching modules, and it doesn't seem to make a blind bit of difference :-(.

I'd love to be able to find out a bit more about what's going on and why these scripts aren't reliable - it's killing my site.
JimboDavies
Forum Members
Forum Members
Posts: 130
Joined: Fri Feb 25, 2011 3:58 pm

Re: Products category intermittently doesn't generate menu

Post by JimboDavies »

This is still doing my head in! We're on a VPS with massive overkill on resources, and I've ensured (or think I've ensured) that our memory limits and time outs on php.ini are set to a suitably high number.

Something (I guess) is killing these scripts, and I'm not competent enough to work out what it is, but it's frustrating me.
User avatar
timdebuurman
Power Poster
Power Poster
Posts: 891
Joined: Sun Nov 06, 2011 8:15 pm
Location: Deventer, Netherlands

Re: Products category intermittently doesn't generate menu

Post by timdebuurman »

Just a guess:

Maybe it's a problem the way you named your Product catagories?

{Products category='Power / Powerboat / Beginner' sortby='weight'}

with all the spaces and slashes..
NextDoorMedia - Online Marketing Partner
https://www.nextdoormedia.nl
JimboDavies
Forum Members
Forum Members
Posts: 130
Joined: Fri Feb 25, 2011 3:58 pm

Re: Products category intermittently doesn't generate menu

Post by JimboDavies »

timdebuurman wrote:Maybe it's a problem the way you named your Product catagories?
That could be a problem - however it works 99% of the time, so I'm confused as to why it would only be an occasional issue.
JimboDavies
Forum Members
Forum Members
Posts: 130
Joined: Fri Feb 25, 2011 3:58 pm

Re: Products category intermittently doesn't generate menu

Post by JimboDavies »

This is still causing an issue for me. I've emailed calguy to see if he could provide some paid support on this, and I'm still really hoping I'll find a way of tracking down the fault.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: Products category intermittently doesn't generate menu

Post by paulbaker »

It seems to pretty much consistently fail as you describe on the home page only - it seemed to work fine on all the other pages. Do you have a different template for the home page? Is there anything different in the back end about the home page?

That's using Chrome, mind. On Firefox the home page shows up just fine. It's definitely a server-side problem though (rather than a browser issue), because when you compare HTML of both (which should be identical?) there are differences; in Chrome we have missing shopping basket div and shorted menu divs. (Oddly also Chrome HTML doesn't show the RSS line in the HEAD, but that's probably a display issue about how Chrome displays HTML).

It's a strange one :o I hope you can solve it.

I like the sound of the St. Maarten Heineken Regatta though. Yes please. O0
JimboDavies
Forum Members
Forum Members
Posts: 130
Joined: Fri Feb 25, 2011 3:58 pm

Re: Products category intermittently doesn't generate menu

Post by JimboDavies »

Cheers Paul - it actually fails (for us!) on all pages intermittently, and we've tried it using Safari, Chrome, Firefox, and even the dreaded internet explorer.

It does seem to be server side rather than browser, which suggests to me there is a script timing out or something.

Re: St Maarten Heineken Regatta, we've got spaces... :-)
Post Reply

Return to “Modules/Add-Ons”