Skip to content

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Sep 13, 2018

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #4135
License MIT

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.

@alexander-schranz alexander-schranz force-pushed the hotfix/fix-preview-renderer branch from 64bf293 to e22e8b6 Compare September 13, 2018 14:15
Copy link
Member

@wachterjohannes wachterjohannes left a 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;
Copy link
Member

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

Copy link
Member

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;
Copy link
Member

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

@alexander-schranz
Copy link
Member Author

@wachterjohannes test added

@alexander-schranz alexander-schranz force-pushed the hotfix/fix-preview-renderer branch from 486a7c8 to 568aad1 Compare September 17, 2018 08:20
@alexander-schranz alexander-schranz force-pushed the hotfix/fix-preview-renderer branch from 568aad1 to faba8f3 Compare September 17, 2018 13:32
@alexander-schranz
Copy link
Member Author

@wachterjohannes merge conflicts fixed

@wachterjohannes wachterjohannes merged commit 04d1e2d into sulu:master Sep 18, 2018
@alexander-schranz alexander-schranz deleted the hotfix/fix-preview-renderer branch September 18, 2018 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants