U4-9483 - SPIKE Creating a new partialview with new create dialog loads undefined

Created by Emil Wangaa 03 Feb 2017, 10:27:51 Updated by Sebastiaan Janssen 23 Feb 2017, 07:50:36

Subtask of: U4-9272

When creating a new partialview, partialviewmacro or script with the new create dialog U4-9429 the editor fails loading the view because it tries to load undefined. The view is created fine but the load of it fails.

Comments

Emil Wangaa 10 Feb 2017, 09:42:55

@Shandem I need you to have a look at this and see if you can figure out the issue as both @madsrasmussen and I have given up on this.

To reproduce simply create a new partialview (or partialviewmacro or script) and save it. The file is saved successful and the tree path is updated correct highlighting the newly created file - but the editor tries to load an undefined partialview (the url switches to /umbraco#/settings/partialviews/edit/undefined) and is empty.


Per Ploug 22 Feb 2017, 23:13:08

This was caused by a requirement of the backoffice routing, as it checks if the current item opened in the editor has an ID equal to what is in the route. If it doesn't it redirects, in this case, the partial view file did not even have a ID property - which is why it redirected to undefined.

Fix was to add a ID to the scriptfile model, which the routing could use,

Fix is committed to dev-v7.6 branch


Sebastiaan Janssen 23 Feb 2017, 07:11:48

Commit reference: https://github.com/umbraco/Umbraco-CMS/commit/d3582e22967e9f1d34225d9fc90085f3b89032d1


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 53

Story Points: 1

Cycle: