Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3907

session timeout message ignores application wide preferred locale

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.1.1
    • Fix Version/s: 8.5.2
    • Component/s: ZK Update Engine
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.5.2 S1

      Description

      Steps to Reproduce

      configure an application wide org.zkoss.web.preferred.locale as library property or servlet context attribute e.g. de_DE

      open any zk page
      clear the session cookie
      initiate au-request to trigger a session timeout message
      (clicking this button is sufficient)

      <button onClick=""/>
      

      Current Result

      the time out message is presented in the locale given in the request header based on your browser's language settings

      Expected Result

      timeout message displayed in German

      Root Cause

      If there's no current session, application wide locale preferences are ignored, even if they are available
      https://github.com/zkoss/zk/blob/v8.5.1.1/zweb/src/org/zkoss/web/servlet/Charsets.java#L193-L215
      e.g. the lines below still return the configured locale even if no session is available

      request.getServletContext().getAttribute(Attributes.PREFERRED_LOCALE)
      Library.getProperty(Attributes.PREFERRED_LOCALE)
      

        Activity

        Hide
        klyvechen klyvechen added a comment -

        Fixed since 2018/05/17

        Show
        klyvechen klyvechen added a comment - Fixed since 2018/05/17
        Hide
        JamesChu JamesChu added a comment -

        Fixed since 2018/06/01

        Show
        JamesChu JamesChu added a comment - Fixed since 2018/06/01

          People

          • Assignee:
            klyvechen klyvechen
            Reporter:
            cor3000 cor3000
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 4 hours Original Estimate - 4 hours
              4h
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 4 hours, 15 minutes
              4h 15m

                Agile