[MGNLSTK-307] "Sitemap" and "SearchResultPage" works in demo-project - but doesnt in INSM client Created: 25/Feb/09  Updated: 23/Jan/13  Resolved: 26/Feb/09

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: templates
Affects Version/s: None
Fix Version/s: 1.1

Type: Bug Priority: Major
Reporter: Rainer Blumenthal Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

The "Sitemap" and the "SearchResult" Template dont work in a different client, like INSM.

The error message is the same in both cases.

i'll provide the error message:



 Comments   
Comment by Rainer Blumenthal [ 25/Feb/09 ]
Expression navigation.selectedItem is undefined on line 3, column 49 in templating-kit/templates/global/horizontalNavigation.ftl.
The problematic instruction:
----------
==> if model.navigation.horizontalLevel >1 && navigation.selectedItem.level>1 [on line 3, column 5 in templating-kit/templates/global/horizontalNavigation.ftl]
 in include "global/horizontalNavigation.ftl" [on line 33, column 9 in templating-kit/templates/main.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression navigation.selectedItem is undefined on line 3, column 49 in templating-kit/templates/global/horizontalNavigation.ftl.
	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
	at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
	at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
	at freemarker.core.ComparisonExpression.isTrue(ComparisonExpression.java:111)
	at freemarker.core.AndExpression.isTrue(AndExpression.java:68)
	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77)
	at freemarker.core.Environment.visit(Environment.java:209)
	at freemarker.core.MixedContent.accept(MixedContent.java:92)
	at freemarker.core.Environment.visit(Environment.java:209)
	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
	at freemarker.core.Environment.visit(Environment.java:209)
	at freemarker.core.MixedContent.accept(MixedContent.java:92)
	at freemarker.core.Environment.visit(Environment.java:209)
	at freemarker.core.Environment.include(Environment.java:1482)
	at freemarker.core.Include.accept(Include.java:169)
Comment by Philipp Bracher [ 26/Feb/09 ]

Took a while until I have been able to reproduce the issue.

For the log

  • horizontal level = 2
  • sitemap = hide in navigation
Generated at Mon Feb 12 07:25:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.