Change By: Evzen Fochr (30/Sep/14 10:47 AM)
Description: This issue is very related to MULTISITE-22, it's is follow up.
The described behavior was also detected on the defaultLocale (MULTISITE-22).

This issue is connected with: 
MAGNOLIA-5931 AbstractI18nContentSupport.getProperty not returning right default value based on default locale


Description:
When changing in a specific site definition the defaultLocale & the fallbackLocale, the already stored content should appear in a dialog.
This is not the case because the fallbackLocale is still served from the "default" site definition, see print screen fallbackLocal.jpg.
(
MULTISITE- 22) corrected that the defaultLocale is set correctly and the dialog opens in the default locale 30 Add to MultiSiteI18nAuthoringSupport.getI18nContentSupport  ( in this case "de" Node node )  from the specific  to get  site  definition  based I18nContentSupport ,  but because the fallbackLocale(en) != defaultLocale(de) the dialog still want to edit a property with "_en" appended to its name. There fore the dialog is empty, and if entering content it will store a "%propertyName_fallsbackLocale%" property.  not default one

Reason
Description
:
In info.magnolia.ui.framework.i18n.DefaultI18NAuthoringSupport.i18nize(HasComponents When opening edit dialog in page app ,  Locale) the  default and fallback  locale  provided as the parameter is the correct defaultLocal. But in this code:
{code}
boolean isFallbackLanguage = i18nContentSupport.getFallbackLocale().equals(locale);
{code}
The provided fallbackLocal
 was taken  from  i18nContentSupport (Object=MultiSiteI18nAuthoringSupport) is from the " default "  site  definition (set in MultiSiteFilter). This because the detected site definition in the scope of the pages app is  not  the actual specific site definition  from  the edited page (different requests)  node based I18nContentSupport .  (same problem as in MULTISITE-22)

Tried solution Solution :
I tried to create also a Added getDefaultkLocale(Node  node  dependent getFallbackLocale ) and getI18nContentSupport (Node node)  method  methods  for  MultiSiteI18nAuthoringSupport &  DefaultI18nAuthoringSupport  as done in the MULTISITE-22 for the defaultLocale .
The problem is that in the calling class of the method DefaultI18NAuthoringSupport#i18nize is the dialogs view: 
info.magnolia.ui.dialog.formdialog.ItemFormView.createLocaleSelector
 Used Extended18NAuthoringSupport as workaround ( )
I haven
we don 't  found a way  want  to  retrieve the content the DialogView operates on  change interface in minor version) .
Which could be well intended by the MVP pattern. A different solution might has to be found.

My sollution -
Then  added getRelatedFormItem to BasicTranformer and then using it in DefaultI18NAuthoringSupport.i18nize to get node based i18nContentSupport  from nodes created by FormBuilder .

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to