Issue Bug Closed

#86703Page's data partly not available via getText if page has form CE

Benjamin Robinson 10/20/18, 15:43 updated 02/04/19, 23:07

Description

Some getText-Values are not available in 9.5.0 if there is a form content element (sysext:form) on the site.
How to reproduce:

Set the layout of an empty page to “Layout 2” and render with following TS:

page = PAGE
page{
  bodyTagCObject = TEXT
  bodyTagCObject.value = <body id="page_{field:uid}" class="layout_{field:layout}">
  bodyTagCObject.insertData = 1
  5 = TEXT
  5.value = Test: page_{field:uid} layout_{field:layout}
  5.insertData = 1
  10 =< styles.content.get
}

Result in FE:

[...]
<body id="page_1" class="layout_2">
Test: page_1 layout_2
[...]

Now create a “form” content element on this site.
Result in FE:

[...]
<body id="page_1" class="layout_0">
Test: page_1 layout_2
[...]

The ID is always correct. The layout is correct in page.5 in both cases, but fails in bodyTagCObject.
I had the same issues with backend_layout in bodyTagCObject with form elements.
The same happend when I tried to use htmlTag_stdWrap.
I guess form resets or overrides some vars.

A workaround is to use {page:layout} instead of {field:layout}.

Reviews 1