ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Laufkötter (JIRA) <j...@apache.org>
Subject [jira] [Updated] (OFBIZ-9445) ContentWorker#findAlternateLocaleContent(Delegator, GenericValue, Locale) does not use fallback locale
Date Wed, 05 Jul 2017 08:00:02 GMT

     [ https://issues.apache.org/jira/browse/OFBIZ-9445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tobias Laufkötter updated OFBIZ-9445:
-------------------------------------
    Attachment: OFBIZ-9445v3.patch

[~jacques.le.roux], did you mean the automated unit and integration tests failed? Executing
them with {{./gradlew cleanAll loadAll test testIntegration}} does not throw an error with
or without the latest patch.

Inserting the originial content _after_ filtering the list does the trick and solves the problem
of OFBIZ-9446. The originial content will therefore not be filtered out if the {{fromDate}}
and {{thruDate}} don't match, but I guess that's okay. It hasn't been filtered out before
and since we don't know which kind of view we are getting, we don't know whether or not such
dates are provided at all. Furthermore, the provided view supposedly is the root content anyway
and was determined to be the correct one beforehand, so not filtering it by date again should
not be an issue. 

(I didn't rename the patch file this time, let's see if this works :-))

> ContentWorker#findAlternateLocaleContent(Delegator, GenericValue, Locale) does not use
fallback locale
> ------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-9445
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9445
>             Project: OFBiz
>          Issue Type: Bug
>          Components: content
>    Affects Versions: Trunk
>            Reporter: Tobias Laufkötter
>            Assignee: Michael Brohl
>             Fix For: 16.11.04
>
>         Attachments: OFBIZ-9445.patch, OFBIZ-9445v2.patch, OFBIZ-9445v3.patch, OFBIZ-9445v3.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message