Uploaded image for project: 'Magnolia Standard Templating Kit'
  1. Magnolia Standard Templating Kit
  2. MGNLSTK-554

freemarker error in search results stk template

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.3
    • Component/s: templates
    • Environment:
      Has occurred in Windows development environment and Redhat production instances using magnolia 4.0, 4.1, 4.2.2

      Description

      • I think there is something in my content that searchResult.ftl doesn't like.
      • I setup a fresh installation of 4.2.2 and imported my content and was able to reproduce the error after activating the website content to the new install.
      • If I put quotes around the search term the error always goes away.
      • I don't always get the error, only on some search terms, although the terms that cause the error, reliably do so.
      • The error is confusing because I can't find a pattern that indicates what the exact problem with my content is(if that is the cause).
      • For example... If I search for the word "issues" I will get 6 results.
      • If I drop the quotes and search for issues I get the error.
      • If I search for each of the 6 search result's page titles without quotes, the search results correctly display for each term.
      • Some search terms will correctly return more than 6 results without using quotes.
      • I am able to print out the count before the exception is thrown using getCount, so I know the results are there.
      • I tried plugging in some new numbers for the -Xss value in java_opts, hoping to address the stackoverflow but it didn't work.
      • I'm still learning freemarker and I am stuck!

      This is the error I am getting...

      get(result) failed on instance of info.magnolia.module.templatingkit.search.SearchResultModel
      The problematic instruction:
      ----------
      ==> assignment: result=model.result! [on line 12, column 1 in templating-kit/paragraphs/features/searchResult.ftl]
      ----------
      Java backtrace for programmers:
      ----------
      freemarker.template.TemplateModelException: get(result) failed on instance ofinfo.magnolia.module.templatingkit.search.SearchResultModel
      at freemarker.ext.beans.BeanModel.get(BeanModel.java:223)
      ...
      further down the stack trace I see pages of this...
      Caused by: java.lang.StackOverflowError
      at java.util.regex.Pattern$Curly.match(Pattern.java:3736)
      at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
      at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
      at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
      at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
      at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
      at java.util.regex.Pattern$Curly.match0(Pattern.java:3789)
      at java.util.regex.Pattern$Curly.match(Pattern.java:3744)
      at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
      at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
      ...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gjoseph Magnolia International
              Reporter:
              marriaga Matthew Arriaga
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: