Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-1564

Sometimes repository-stored FreeMarker templates are not refreshed automatically.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.20.03
    • 2.20.04, 2.21.01
    • None
    • None

    Description

      During development with repository-stored freemarker templates, we found that sometimes the changes are not refreshed automatically.
      Sometimes it looks working fine but some time later, it isn't refreshed. There's no clear reproducing steps available.
      So, I looked into HstFreemarkerServlet and RepositoryTemplateLoader class to guess some possible cases.

      IMO, there are two possible cases:

      • When the cms is restarted, the event listener will not work any more.
      • When the session is not valid any more for some reason in the repository side, the event listener will not work.

      Currently, RepositoryTemplateLoader registers a observation event listener at initilalization.
      However, it doesn't check if the session is valid periodically. And it doesn't remove the registered listener after all.
      So, I'd like to suggest the following:
      (1) Check the session validity periodically as being done in EventListenersContainerImpl
      (2) When the HstFreemarkerServlet is destroyed, remove the registered listeners.

      Attachments

        Activity

          People

            aschrijvers Ard Schrijvers
            wko Woonsan Ko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: