[EZP-30590] Fix noLayout default value #2656
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to v6.0,
ViewController::viewLocation()
andViewController::viewContent()
had parameter$layout
default value tofalse
. The consequence was thatnoLayout
parameter, injected furtherdown in templates, had
true
as default value (the exact opposite).The goal of such parameter was to ensure that templates used in subrequests always had the information not to use the main pagelayout by default, especially when rendering content from legacy (templates not migrated yet to Twig).
We could also do stuff like the following:
Problem with the value injected by
NoLayout
injector is that the default value ofnoLayout
parameter changed. It currently checks iflayout
parameter is present (which is not the case by default with the new view system) and if not, defaults tofalse
.Consequence is that when migrating an instance from eZ Publish 5 to Platform with legacy bridge, main layout is always used. This sounds like an undocumented BC break to me 😉.
Before opening a Jira issue, I wanted to know is that could be an acceptable fix. I don't see any possible regression here since even using Symfony stack,
noLayout
variable will never have the expected value anyway without this fix.TODO: