Layout has a faulty condition

Two level, smoothly expanding, search engine friendly accordion menu.
Post Reply
felakuti1958
Posts: 8
Joined: Fri Jun 26, 2009 7:27 pm

Layout has a faulty condition

Post by felakuti1958 » Mon Nov 05, 2012 6:13 pm

I am getting the following error message in my v11 Actinic.

The Glossy Accordion Menu Setup layout has a faulty condition in it.

The code is listed below and any help would be appreciated.

<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="ddaccordion.js">
/***********************************************
* Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
</script>
<script type="text/javascript">
// modified www.drillpine.biz for Actinic integration
function openmenu(sid){
var links = document.getElementsByName('acctop');
var active = new Array();
for ( i=0; i<links.length; i++ ) if ( links.className.indexOf('submenuheader') > -1 ) active.push(links);
for ( i=0; i<active.length; i++ ) if ( active.getAttribute('sid') == sid) ddaccordion.expandone('submenuheader', i);
}

function expandcurrent(){
<actinic:block if="%3cactinic%3avariable%20name%3d%22AM%2dOpenToCurrent%22%20%2f%3e"><actinic:block type="ParentSectionList"><actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%201" >openmenu('<actinic:variable name="SectionID" />')</actinic:block></actinic:block></actinic:block>
}

var plusimage = "<img src='accordion-plus-<actinic:variable name="AM-MenuBackground" />.gif' class='statusicon' />";
var minusimage = "<img src='accordion-minus-<actinic:variable name="AM-MenuBackground" />.gif' class='statusicon' />";

ddaccordion.init({
headerclass: "<actinic:variable name="AM-HeaderClass" />",<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //Shared CSS class name of headers group</actinic:block>
contentclass: "<actinic:variable name="AM-ContentClass" />",<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //Shared CSS class name of contents group</actinic:block>
revealtype: "<actinic:variable name="AM-RevealType" />",<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"</actinic:block>
mouseoverdelay: <actinic:variable name="AM-MouseOverDelay" />,<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover</actinic:block>
collapseprev: <actinic:variable name="AM-CollapsePrev" />,<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //Collapse previous content (so only one open at any time)? true/false</actinic:block>
defaultexpanded: <actinic:variable name="AM-DefaultExpanded" />,<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //index of content(s) open by default [index1, index2, etc] [] denotes no content</actinic:block>
onemustopen: <actinic:variable name="AM-OneMustOpen" />,<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //Specify whether at least one header should be open always (so never all headers closed)</actinic:block>
animatedefault: <actinic:variable name="AM-AnimateDefault" />, //Should contents open by default be animated into view?</actinic:block>
persiststate: <actinic:variable name="AM-PersistState" />,<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //persist state of opened contents within browser session?</actinic:block>
toggleclass: <actinic:variable name="AM-ToggleClass" />,<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]</actinic:block>
togglehtml: <actinic:variable name="AM-ToggleHtml" />,<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)</actinic:block>
animatespeed: "<actinic:variable name="AM-AnimateSpeed" />",<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"</actinic:block>
oninit:<actinic:variable name="AM-OnInit" />,<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //custom code to run when headers have initalized</actinic:block>
onopenclose:<actinic:variable name="AM-OnOpenClose" /><actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" > //custom code to run whenever a header is opened or closed</actinic:block>
});
</script>
<link href="accordion-glossy.css" rel="stylesheet" type="text/css">

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Re: Layout has a faulty condition

Post by norman » Tue Nov 06, 2012 3:22 pm

The code you've posted is not from my V11 version of Accordion Menu. It may be from an obsolete V9 version.

I can only support versions of add-ons that match the version of Actinic they run on.

Email me for details of upgrade costs.
Norman

felakuti1958
Posts: 8
Joined: Fri Jun 26, 2009 7:27 pm

Re: Layout has a faulty condition

Post by felakuti1958 » Tue Nov 13, 2012 4:07 pm

I already have the version 11 update.

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Re: Layout has a faulty condition

Post by norman » Tue Nov 13, 2012 4:41 pm

I already have the version 11 update.
But the code you've posted is from V9. Looks like you've not installed the update that you were sent 1 year ago.

Email me and I'll send the latest Accordion Menu as there have been 7 minor changes since then.
Norman

felakuti1958
Posts: 8
Joined: Fri Jun 26, 2009 7:27 pm

Re: Layout has a faulty condition

Post by felakuti1958 » Fri Nov 16, 2012 10:00 am

Thanks for the latest patch which I have implemented. I am still getting that the Glossy Accordion menu setup layout has a faulty condition error. The error highlighted is as follows

<actinic:block if="%3cactinic%3avariable%20name%3d%22AM%2dOpenToCurrent%22%20%2f%3e" >

The full code is

Code: Select all

<script type="text/javascript">
	// v215
	if ( typeof(jQuery) == 'undefined' ) document.write('<script type="text/javascript" src="jquery-1.7.1.min.js"></sc' + 'ript>');
	var plusimage = "<div class='statusicon'><img border='0' src='accordion-<actinic:variable name="AM-MenuBackground" />-<actinic:variable name="AM-ArrowType" />-plus.png' /></div>";
	var minusimage = "<div class='statusicon'><img border='0' src='accordion-<actinic:variable name="AM-MenuBackground" />-<actinic:variable name="AM-ArrowType" />-minus.png' /></div>";
	var amsubsid = '<actinic:block if="%3cactinic%3avariable%20name%3d%22AM%2dOpenToCurrent%22%20%2f%3e" ><actinic:block type="ParentSectionList"><actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%201" ><actinic:variable name="SectionID" encoding="perl" selectable="false" /></actinic:block></actinic:block></actinic:block>';
	<actinic:block if="%3cactinic%3avariable%20name%3d%22AM%2dThirdLevelShow%22%20%2f%3e">
		var subplusimage = "<img src='accordion-<actinic:variable name="AM-MenuBackground" />-<actinic:variable name="AM-SubArrowType" />-sub-plus.png' class='substatusicon' />";
		var subminusimage = "<img src='accordion-<actinic:variable name="AM-MenuBackground" />-<actinic:variable name="AM-SubArrowType" />-sub-minus.png' class='substatusicon' />";
		var amsubsubsid = '<actinic:block if="%3cactinic%3avariable%20name%3d%22AM%2dSubOpenToCurrent%22%20%2f%3e"><actinic:block type="ParentSectionList"><actinic:block if="%3cactinic%3avariable%20name%3d%22AM%2dThirdLevelShow%22%20%2f%3e%20AND%20%28%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%202%29" ><actinic:variable name="SectionID" encoding="perl" selectable="false" /></actinic:block></actinic:block></actinic:block>';
	</actinic:block>
</script>
<script type="text/javascript" src="ddaccordion-2.0.js">
/***********************************************
* Accordion Content script- (c) Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
</script>
<link href="accordion-glossy.css" rel="stylesheet" type="text/css">
<actinic:block if="%3cactinic%3avariable%20name%3d%22AM%2dOptimiseJavaScript%22%20%2f%3e" >
	<!-- the following two lines trick Actinic into expanding Variables into a JavaScript file. N.B. the .css suffix is required and deliberate. -->
	<script>/*<link href="accordionsupport.css" rel="stylesheet" type="text/css">*/</script>
	<script type="text/javascript" src="accordionsupport.css"></script>
</actinic:block>
<actinic:block if="%21%20%3cactinic%3avariable%20name%3d%22AM%2dOptimiseJavaScript%22%20%2f%3e" >
	<actinic:variable name="AccordionMenuSetup" value="Accordion JavaScript" />
</actinic:block>
<actinic:block php="true" >$am_sid = '<actinic:block if="%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22%29%20OR%20%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Product%20Page%22%29" ><actinic:variable name="SectionID" selectable="false" /></actinic:block>';</actinic:block>

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Re: Layout has a faulty condition

Post by norman » Fri Nov 16, 2012 10:31 am

Weird. Have pasted your code into my Accordion Menu Setup and it works fine. May be something specific to your sites configuration.

Try going to Settings / Site Options / Accordion Menu and set OptimiseJavaScript to false.
Norman

felakuti1958
Posts: 8
Joined: Fri Jun 26, 2009 7:27 pm

Re: Layout has a faulty condition

Post by felakuti1958 » Fri Nov 16, 2012 1:14 pm

I changed as you suggested but it's still coming up with the same error.

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Re: Layout has a faulty condition

Post by norman » Fri Nov 16, 2012 2:55 pm

Problem must be unique to your site. I'll need a Snapshot. Email me for details of how to send.
Norman

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Re: Layout has a faulty condition

Post by norman » Fri Nov 16, 2012 9:28 pm

Snapshot loaded. Don't see any error messages and Accordion is working OK.

Exactly where / how do you get the error message?

UPDATE: See it now on some Sections when doing a Preview. Will test further.
Norman

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Re: Layout has a faulty condition

Post by norman » Sat Nov 17, 2012 12:44 am

O.K. The error is that somehow some of the Accordion Variables (AM-OpenToCurrent is one) aren't being "seen" when the page is built. Somehow about 180 Sections out of 3200 have the error and that's weird as the AM-OpenToCurrent variable is a Site level variable and should be available with the same value to all Sections.

This isn't Accordion misbehaving but something wrong with your Actinic Database.

Deleting the contents of the Accordion Layouts, deleting all Accordion Variables and re-importing the Accordion Partial Site Design seems to fix it here. here's the Sequence I followed:

1) Make a Snaphot and back-up your Site folder, just in case.

2) Go to Design / Library / Layouts / Accordion Menu. Open the following Layouts and delete all contents (leave the Layouts in place).
Accordion JavaScript
Glossy Accordion Menu
Glossy Accordion Menu (PHP)
Glossy Accordion Menu Setup

3) Go to Design / Library / Layouts / Accordion Sub Section List / Accordion Sub Sections. Delete all contents (leave the Layout in place).

4) Close the Library.

5) Go to Design / Library / Variables / Accordion Menu. Delete each Variable in turn until none are left.

6) Close the Library, close and Restart Actinic.

7) In Actinic, do: File / Snapshot / Import Design. Choose the file AccordionMenu.acd (from your Site folder) and proceed with the import.

8) Close and Restart Actinic and that should be it fixed.


Note that when doing Step 7 here, I got an error message (I'm using SellerDeck V11.0.3):

Code: Select all

Your content category used to categorise product seems to be removed.
The following items are affected:

Optimum Nutrition 2:1:1 Recovery 1.6kg
Schiek Padded Lifting Straps With Dowel
Vitasorb B6 (water solubilised vitamin B6) 30ml
.
.
Followed by 4200 other products!
.
.
Press 'Yes' to fix these product. They will be re-categorised to the default category 'Standard' .
And then a similar message re Fragments. This points to something wrong in your Database and it may be worth sending it to SellerDeck for test/repair.
Norman

felakuti1958
Posts: 8
Joined: Fri Jun 26, 2009 7:27 pm

Re: Layout has a faulty condition

Post by felakuti1958 » Sat Nov 17, 2012 12:15 pm

Thank you. That appears to have solved the problem.

Post Reply