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

ContentWorker#findAlternateLocaleContent(Delegator, GenericValue, Locale) does not use fallback locale

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk
    • 16.11.04
    • content
    • None
    • Patch

    Description

      Contrary to the UiLabels the ContentWorker#findAlternateLocaleContent(Delegator, GenericValue, Locale) function does not default to the fallback locale if no alternate content with the given locale is found, but returns the originial content. This proves to be an issue, if the root content is not in the fallback language.

      For instance: if the fallback locale is set to english, the ProductContent for the PRODUCT_NAME is in german, the alternate locale contents for the product name are english and spanish, then an italian visitor will see the page in english, but the product names in german.

      A fix for this issue is simple:
      If no alternate locale content for the requested locale is found, search for an alternate locale content with the locale configured in general.properties at locale.properties.fallback. If this one isn't found either we can still return the original content.

      Attachments

        1. OFBIZ-9445.patch
          2 kB
          Tobias Laufkötter
        2. OFBIZ-9445v2.patch
          1 kB
          Tobias Laufkötter
        3. OFBIZ-9445v3.patch
          3 kB
          Tobias Laufkötter
        4. OFBIZ-9445v3.patch
          3 kB
          Tobias Laufkötter

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mbrohl Michael Brohl
            tlaufkoetter Tobias Laufkötter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment