Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12660

Wrong Less file URL when locale is tr-TR

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 18.12.06, 22.01.01, Upcoming Branch
    • 22.01.01
    • themes
    • None

    Description

      If

      • current locale is tr-TR (and most certainly az-AZ, maybe others, where dotless i exists),
      • the theme name contains a "i" (`RAINBOWSTONE-SAPHIR` for example),
      • the theme uses this line in /template/includes/Header.ftl to generate a link to a Less file (rainbowstone, helveticus, maybe others) :
      <link rel="stylesheet/less" href="<@ofbizContentUrl>/helveticus/${visualTheme.visualThemeId?replace("_","-")?lower_case}.less</@ofbizContentUrl>" type="text/css"/>

      Then

      • the Freemarker `lower_case` function generates dotless i's when lowercasing "I",
      • the link to the Less ends up with a 404
      • no more styles :/

      See turkish-dotless-i-bug.mp4

      Leads to fix this

      • Find a way to override the current locale for `lower_case` calls (and always use en-EN)
      • Do not rely on a locale sensitive function to generate links to style files
      • Ban "i" from visual theme names
      • more ideas ?

      Attachments

        1. image-2022-07-19-17-21-33-183.png
          28 kB
          Florian Motteau
        2. of-12660.mp4
          1.00 MB
          Florian Motteau
        3. OFBIZ-12660.patch
          21 kB
          Jacques Le Roux
        4. turkish-dotless-i-bug.mp4
          538 kB
          Florian Motteau

        Activity

          People

            jleroux Jacques Le Roux
            FloMo Florian Motteau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: