-
Notifications
You must be signed in to change notification settings - Fork 350
Fix preview renderer preview attribute and xml http request #4146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix preview renderer preview attribute and xml http request #4146
Conversation
64bf293
to
e22e8b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also add a test for this? Unit would be enough
@@ -158,6 +158,9 @@ public function render($object, $id, $webspaceKey, $locale, $partial = false, $t | |||
} | |||
|
|||
$attributes = $this->routeDefaultsProvider->getByEntity(get_class($object), $id, $locale, $object); | |||
$attributes['object'] = $object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be set by the RouteDefaultsProvider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be removed
@@ -158,6 +158,9 @@ public function render($object, $id, $webspaceKey, $locale, $partial = false, $t | |||
} | |||
|
|||
$attributes = $this->routeDefaultsProvider->getByEntity(get_class($object), $id, $locale, $object); | |||
$attributes['object'] = $object; | |||
$attributes['preview'] = true; | |||
$attributes['partial'] = $partial; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be used by the WebsiteController
has to be here
@wachterjohannes test added |
486a7c8
to
568aad1
Compare
568aad1
to
faba8f3
Compare
@wachterjohannes merge conflicts fixed |
What's in this PR?
Remove the server variable which symfony use the indicate xmlhttprequest and set preview and the other attirbutes correctly.
Why?
XMLHttpRequest was true which shouldn't and preview was not longer set.