Uploaded image for project: 'Magnolia RSS Aggregator Module'
  1. Magnolia RSS Aggregator Module
  2. MGNLRSSAGG-91

Using a path with a dash ("-") or a feed name starting with a digit in a stkSingleFeed paragraph causes an exception in FeedListModel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 1.4.3, 2.0.2
    • 1.2.4
    • None
    • None

      I created an RSS Aggregator under AdminCentral > Data > RSS Aggregators and called it '3FM Lowlands'. This created data:/rssaggregator/3FM-Lowlands.

      When selecting this path in an instance of stkSingleFeed the FeedListModel class throws an InvalidQueryException in the getFeeds() method, saying:

      javax.jcr.query.InvalidQueryException: Encountered "-" at line 1, column 38.
      Was expecting one of:
          <IntegerLiteral> ...
          <DecimalLiteral> ...
          <DoubleLiteral> ...
          <StringLiteral> ...
          "<?" ...
          "<?" ...
          <AxisChild> ...
          <AxisDescendant> ...
          <AxisParent> ...
          <AxisAttribute> ...
          <AxisSelf> ...
          <AxisDescendantOrSelf> ...
          <AxisAncestor> ...
          <AxisFollowingSibling> ...
          <AxisPrecedingSibling> ...
          <AxisFollowing> ...
          <AxisPreceding> ...
          <AxisAncestorOrSelf> ...
          "$" ...
          <ElementType> ...
          <AttributeType> ...
          <SchemaElementType> ...
          <SchemaAttributeType> ...
          <OrderedOpen> ...
          <UnorderedOpen> ...
          <ElementQNameLbrace> ...
          <AttributeQNameLbrace> ...
          <PINCNameLbrace> ...
          <PILbrace> ...
          <CommentLbrace> ...
          <ElementLbrace> ...
          <AttributeLbrace> ...
          <TextLbrace> ...
          "*" ...
          <NCNameColonStar> ...
          <StarColonNCName> ...
          "(" ...
          "@" ...
          <DocumentLpar> ...
          <DocumentLparForKindTest> ...
          <DocumentLbrace> ...
          <NodeLpar> ...
          <CommentLpar> ...
          <TextLpar> ...
          <ProcessingInstructionLpar> ...
          <ElementTypeForKindTest> ...
          <ElementTypeForDocumentTest> ...
          <AttributeTypeForKindTest> ...
          <SchemaElementTypeForKindTest> ...
          <SchemaElementTypeForDocumentTest> ...
          <SchemaAttributeTypeForKindTest> ...
          <ProcessingInstructionLparForKindTest> ...
          <TextLparForKindTest> ...
          <CommentLparForKindTest> ...
          <NodeLparForKindTest> ...
          "." ...
          ".." ...
          <QNameLpar> ...
          "<" ...
          "<" ...
          "<!--" ...
          "<!--" ...
          <QName> ...
           for statement: for $v in /jcr:root/rssaggregator/3FM-Lowlands/data/element(*, dataItemNode) order by @jcr:name  return $v
      

      The paragraph doesn't render correctly after that too:

      2013-08-01 13:40:45,279 ERROR freemarker.runtime                                : Error on line 26, column 1 in templating-kit/paragraphs/teasers/stkTeaserSingleFeed.ftl
      model.feeds is undefined.
      It cannot be assigned to feedList
      
      Error on line 26, column 1 in templating-kit/paragraphs/teasers/stkTeaserSingleFeed.ftl
      model.feeds is undefined.
      It cannot be assigned to feedList
      The problematic instruction:
      ----------
      ==> assignment: feedList=model.feeds [on line 26, column 1 in templating-kit/paragraphs/teasers/stkTeaserSingleFeed.ftl]
      ----------
      
      Java backtrace for programmers:
      ----------
      freemarker.core.InvalidReferenceException: Error on line 26, column 1 in templating-kit/paragraphs/teasers/stkTeaserSingleFeed.ftl
      model.feeds is undefined.
      It cannot be assigned to feedList
      

        Acceptance criteria

              rkovarik Roman Kovařík
              breun Nils Breunese
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD