Uploaded image for project: 'Extended Templating Kit (closed)'
  1. Extended Templating Kit (closed)
  2. MGNLETK-76

NullPointerException when calling MagnoliaTemplatingUtilities.getInstance().createLink(content) from outside a web context

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 2.0.2
    • 1.4.3
    • None
    • None

    Description

      I'm calling MagnoliaTemplatingUtilities.getInstance().createLink(content) from outside a web context (code initiated by an activation) and end up with a nullpointerexception in the below method:

      info.magnolia.module.extendedtemplatingkit.DomainNamePathTransformer#transform

      WebContext ctx = MgnlContext.getWebContextOrNull();
      ExtendedAggregationState state = (ExtendedAggregationState) ctx.getAggregationState();
      

      Obviously I end up with a null ctx.. not sure if I'm not allowed to use the MagnoliaTemplatingUtilities outside a web context?

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                had Jan Haderka
                thbr03 Tomas Brimor
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: