Yes, it is the source of the problem: I have downloaded, compiled and put
the the modified
XWikiDocument.java
<https://github.com/xwiki/xwiki-platform/commit/0382f6ce82ea772c5f8379d3ed97094f22e122ad#diff-9c8228109f081a40ad73bfd95c485902>
into
the application and the functions return the expected result for the
translated page too.

Thank you!

Best Regards,
Zoltán

On Wed, Nov 16, 2016 at 11:52 AM, Vincent Massol <vinc...@massol.net> wrote:

> Could it be that you are hitting http://jira.xwiki.org/browse/XWIKI-13873
> ?
>
> Thanks
> -Vincent
>
> > On 16 Nov 2016, at 11:00, Zoltán Kukk <zoltan.k...@gmail.com> wrote:
> >
> > Hi Vincent,
> >
> > Thank you, but my problem is not that the objects are not translated.
> > It is okay that objects are not translated but it is not okay if a
> > translated page opened then
> > in the velocity macro of the translated page (or in the sheet of the
> > attached class) the
> > $doc.getObject('SomeClass') or $doc.getxWikiObjects() gives no result,
> > but when I open the page on the default language the functions give the
> > expected results.
> > It works as expected in 8.2.1 but in 8.3 and 8.4 I have got the described
> > behaviour.
> >
> > I have uploded my sample pages in a XAR archive here:
> http://bit.ly/2eZk0hP
> > You can import it into a clean XWiki 8.4 zip distribution, the
> multilingual
> > must be enabled
> > and the default language should be set to "hu" and the enabled languages
> to
> > "hu","en".
> >
> > In the sample the MyClassSheet contains this velocity macro:
> >
> >> {{velocity}}
> >> MyClassSheet:
> >> MyClass: $doc.getObject('MySpace.MyClass')
> >> Objects: $doc.getxWikiObjects()
> >> ----
> >> #if ( $doc.name != 'MyClassSheet')
> >>  {{include reference=""}}
> >> #end
> >> {{/velocity}}
> >
> >
> > I have attached two object to the MySpace/MyPage/MySubPage page and the
> > results are:
> >  for default language:
> >
> > http://localhost:8080/xwiki/bin/view/MySpace/MyPage/
> MySubPage/?language=hu
> >      MyClassSheet:
> >      MyClass: com.xpn.xwiki.api.Object@626a88b1 *<== OK*
> >      Objects: {MySpace.MyClass=[com.xpn.xwiki.api.Object@1a77a709,
> > com.xpn.xwiki.api.Object@50dc1019]}  *<== OK*
> >
> >  for translated language:
> >
> > http://localhost:8080/xwiki/bin/view/MySpace/MyPage/
> MySubPage/?language=en
> >      MyClassSheet:
> >      MyClass: $doc.getObject('MySpace.MyClass') *<== WRONG*
> >      Objects: {}  *<== WRONG*
> >
> > Best Regards,
> > Zoltán
> >
> > On Wed, Nov 16, 2016 at 10:00 AM, Vincent Massol <vinc...@massol.net>
> wrote:
> >
> >> Hi Qkxy,
> >>
> >>> On 14 Nov 2016, at 17:19, Qkxy <zoltan.k...@gmail.com> wrote:
> >>>
> >>> Hi All,
> >>>
> >>> I have two XWiki 8.3 instances, both are set up for multilangue
> support:
> >>> default language hu, enabled languages en, hu.
> >>> I have created a page by script in instance 1 and created a hu
> >> translation
> >>> for this page by the editor.
> >>> The page has many objects.
> >>> I have exported the page as xar from instance 1 and imported into
> >> instance
> >>> 2.
> >>> When I access the localized page in instance 2 it does not lists its
> >>> objects,
> >>> the $doc.getxWikiObjects() in velocity returns an empty map.
> >>> Do you have any idea what can cause this?
> >>> What could be missing in instance2?
> >>
> >> Objects are not translated in XWiki at the moment.
> >>
> >> See http://platform.xwiki.org/xwiki/bin/view/DevGuide/
> >> InternationalizingApplications#HI18nofXWikiObjects
> >>
> >> Thanks
> >> -Vincent
> >>
> >>> The XML content almost identical on instance1, but the
> >>> $doc.getxWikiObjects() gives a non empty result
> >>> when the localized page rendered.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context: http://xwiki.475771.n2.nabble.
> >> com/XWiki-translated-page-strange-behaviour-tp7601835.html
> >>> Sent from the XWiki- Users mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> users mailing list
> >> users@xwiki.org
> >> http://lists.xwiki.org/mailman/listinfo/users
> >>
> > _______________________________________________
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to