U4-9665 - Creating a Partial View Macro no longer creates a Macro, just the view

Created by Shannon Deminick 23 Mar 2017, 07:52:10 Updated by Shannon Deminick 29 Mar 2017, 07:06:42

Tags: Unscheduled

Subtask of: UAASSCRUM-810

Your report will have a greater chance of being addressed if you can give us clear steps to reproduce the issue, please answer the following questions in as much detail as possible: What did you do?

What did you expect to happen?

What actually happened?

Comments

Stephan 27 Mar 2017, 07:15:00

Reproduced


Stephan 27 Mar 2017, 07:25:36

7.6 ends up doing /umbraco/backoffice/UmbracoApi/CodeFile/PostSave whereas 7.5 ended up doing /umbraco/create.aspx?nodeId=init&nodeType=partialViewMacros&nodeName=Partial%20%20View%20%20Macro%20%20Files - which ends up in PartialViewMacro.ascx checking for whether to create the macro or only the file - 7.6 does not even exposes the checkbox + uses the CodeFileController which has no support at all for creating macros.


Stephan 27 Mar 2017, 07:28:57

That same controller is used for scripts, partial views & partial view macros, and only the latter can potentially create a macro. It's not used (yet) for Xslt. It only deals with files really, not sure I want to add macro concerns in there... Maybe a second MacroController of some sort and call both from JS?


Stephan 28 Mar 2017, 10:17:34

Current status: have added the checkbox back, but the whole code editor is no JS based, does not seem to be any C# controller, so need to deal w/macros one way or another...


Stephan 28 Mar 2017, 15:23:56

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

review: now, should be possible to tick a "create macro" box and then a macro is also created pointing to the file


Shannon Deminick 29 Mar 2017, 06:48:40

only problem so far is that there's change tracking enabled on the fields in the dialog so when the dialog is closed it has the 'are you sure you want to navigate away' alert. I'll fix this up it's easy.


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.6.0

Sprint: Sprint 55

Story Points: 3

Cycle: