Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-11621

HstRequestContext#getSession() returns wrong JCR Session in Wicket code

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 13.0.0
    • None
    • None
    • Pulsar
    • Platform 197 - Workshop+

    Description

      Since version 13.0.0, CMS wicket code can get hold of the HstRequestContext, simply by

      final HstRequestContext requestContext = RequestContextProvider.get();
      

      If however in CMS Wicket code then the JCR Session is requested from the request context, via

      final HstRequestContext requestContext = RequestContextProvider.get();
      requestContext.getSession();
      

      then the CMS JCR Session should be returned. However, currently, when this is invoked, the HST will return a pooled live user session since the HstRequestContext did not yet have an associated JCR Session. This is likely to result in problems. In Wicket code, the JCR Session from the wicket code should be returned.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: