Uploaded image for project: 'Magnolia Standard Templating Kit (closed)'
  1. Magnolia Standard Templating Kit (closed)
  2. MGNLSTK-533

pur integration in templating kit breaks with external users.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Outdated
    • Icon: Major Major
    • 1.2.2, 1.2.3, 1.3
    • None
    • paragraphs

      I have an issue with an exception that occurs when I log in with an LDAP account,
      the adminInterface works fine , but the site gives an exception:

      2009-11-20 11:00:31,969 ERROR freemarker.runtime :
      Method public java.lang.String info.magnolia.cms.security.ExternalUser.getProperty(java.lang.String) threw an exception when invoked on info.magnolia.cms.security.ExternalUser@11fde0
      The problematic instruction:
      ----------
      ==> assignment: userFullName=ctx.user.getProperty("title")!userName [on line 4, column 1 in templating-kit/paragraphs/pur/link.ftl]
      ----------

      Java backtrace for programmers:
      ----------
      freemarker.template.TemplateModelException: Method public java.lang.String info.magnolia.cms.security.ExternalUser.getProperty(java.lang.String) threw an exception when invoked on info.magnolia.cms.security.ExternalUser@11fde0
      at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:130)
      at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
      at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
      at freemarker.core.DefaultToExpression._getAsTemplateModel(DefaultToExpression.java:100)

      Caused by: java.lang.UnsupportedOperationException: not implemented for this ExternalUser
      at info.magnolia.cms.security.ExternalUser.getProperty(ExternalUser.java:155)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      It seems that the / templating-kit/paragraphs/pur/link.ftl tries to get the fullname from an external user:

      assign userFullName = ctx.user.getProperty("title")!userName

      But ExternalUser has this as
      its getProperty:

      public String getProperty(String propertyName)

      { throw new UnsupportedOperationException("not implemented for this ExternalUser"); }

      I am currently runing Magnolia Enterprise Edition 4.1RC1 and
      Templating Kit Standard 1.2RC2 , Extended 1.2RC1

        Acceptance criteria

              fgrilli Federico Grilli
              rico.jansen Rico Jansen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: