U4-11406 - Culture for Macros rendering in the backoffice

Created by Markus Johansson 01 Jun 2018, 15:44:57 Updated by Sebastiaan Janssen 19 Jun 2018, 06:11:10

Tags: PR

'''What did you do?''' Included a macro containing some dictionary values in a RTE in the backoffice

'''What did you expect to happen?''' The macro preview should render the view as it would look on the front end with the culture for the document/node that is currently being edited. The MacroController does not handle the culture in any way and the rendered result will be based on the users backoffice language settings, not the culture of the node that is edited.

'''What actually happened?''' The rendering of the macro in the backoffice should take into account the culture of the page that the macro renders on and set the culture to the one of the document/node/IPublishedContent.

I have a PR coming that sets the culture based on the IPublishedContent of the current request. But I guess it will suffer from the same issues as U4-10091 since deep down in the PartialViewMacroEngine (line 113) we're getting the IPublishedContent from the cache and if the content is not published I guess we'll have problems.

Comments

Sebastiaan Janssen 19 Jun 2018, 06:11:10

PR: https://github.com/umbraco/Umbraco-CMS/pull/2666


Priority: Minor

Type: Bug

State: Fixed

Assignee:

Difficulty: Easy

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.10.4

Due in version: 7.11.0

Sprint:

Story Points:

Cycle: