On Fri, May 11, 2012 at 2:31 PM, Marius Dumitru Florea <[email protected]> wrote: > I opened http://jira.xwiki.org/browse/XWIKI-7815 . > > On Fri, May 11, 2012 at 11:47 AM, Vincent Massol <[email protected]> wrote: >> >> On May 11, 2012, at 10:35 AM, Thomas Mortagne wrote: >> >>> On Fri, May 11, 2012 at 10:25 AM, Marius Dumitru Florea >>> <[email protected]> wrote: >>>> Hi devs, >>>> >>>> While debugging the failing REST integration tests I discovered an >>>> inconsistency in the page REST resource. Take for instance the >>>> response returned for this URL: >>>> >>>> /xwiki/rest/wikis/xwiki/spaces/Blog/pages/BlogIntroduction >>>> >>>> * The returned content is the raw (not rendered) content. In this >>>> particular case, since the blog post content is saved in the blog post >>>> object, and also because the blog uses the new sheet system, the raw >>>> content of Blog.BlogIntroduction page is empty >>>> >>>> * The returned title is the display title (i.e. the rendered title). >>>> In this particular case, since the raw title is empty, but the blog >>>> post sheet, which controls how the title is displayed, renders the >>>> 'title' property of the blog post. >>>> >>>> The inconsistency is that the content is raw while the title is >>>> rendered. I think the page REST resource should provide data in the >>>> first place, so raw title. It could provide the rendered title or >>>> content additionally, but that is secondary IMO. >>>> >>>> WDYT? >>> >>> I agree. The default behavior of REST should be to return data. >>> Especially since thee is nothing here to indicate in which syntax to >>> output the title. >> > >> I agree too. We need to decide how to handle this change though since it's >> going to break backward compat. > > I think the "title" page REST resource property should provide the raw > document title on the long run, and the rendered title could be > obtained through http://jira.xwiki.org/browse/XWIKI-5820 . So I don't > see other solution besides:
But this means that in order to get technical info about a page (parent, children, etc) and the rendered title you'll need to make 2 requests right ? Is the raw title really useful outside of an editor ? > > * adding a compatibility flag to control if the value of the "title" > property is the rendered document title or the raw document title. > * adding a new page resource property, "renderedTitle" (or > "displayTitle", to be decided) > * use "renderedTitle" in XWiki platform where the rendered title is > needed, until we have XWIKI-5820. Deprecate "renderedTitle" property > afterwards. > * provide the document raw title by default and document in the > release notes the flag that can be used to get back the previous > behaviour (rendered title) > > WDYT? > > Thanks, > Marius > >> >> Thanks >> -Vincent >> >>>> I'll fix the REST integration tests by using a page that doesn't have a >>>> sheet. >>>> >>>> Thanks, >>>> Marius >> _______________________________________________ >> devs mailing list >> [email protected] >> http://lists.xwiki.org/mailman/listinfo/devs > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs -- Jean-Vincent Drean, XWiki. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

