[MGNLSTK-1476] Reordering pages uses wrong path for template availibility check. Created: 27/Nov/14 Updated: 15/Apr/16 Resolved: 20/Jul/15 |
|
| Status: | Closed |
| Project: | Magnolia Standard Templating Kit (closed) |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Rico Jansen | Assignee: | Trang Truong |
| Resolution: | Obsolete | Votes: | 0 |
| Labels: | quickwin, support, vpro | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 5d | ||
| Original Estimate: | 1d | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Date of First Response: | |||||||||
| Sprint: | Sprint 1 (Vietnam), Sprint 2 (Basel) | ||||||||
| Story Points: | 1 | ||||||||
| Description |
|
When reordering pages in admincentral the info.magnolia.module.templatingkit.sites.TemplateAvailability#isAvailable check is done with a temporaryNode that has as parent the node that the node to be moved is moved below. This is incorrect, it should use the parent (the overview) node of node News01 as that is the parent that the node will have after the move, it will not be a child of News02. Because our templateavailability disallows news pages as parent of news pages this does not work. |
| Comments |
| Comment by Richard Gange [ 05/Mar/15 ] |
|
Hi Rico- I think I have to disagree with you here. If News01 is being moved under News02 then we need to look at what the template availability is at the level under News02. In that case we are talking about a content page under a content page which is a legal move in info.magnolia.module.templatingkit.sites.TemplateAvailability. if (category.equals(TemplateCategory.CONTENT)) { return parentTemplateCategory.equals(TemplateCategory.SECTION) || parentTemplateCategory.equals(TemplateCategory.CONTENT) || parentTemplateCategory.equals(TemplateCategory.FEATURE) || parentTemplateCategory.equals(TemplateCategory.FUNCTIONAL); }
Our template availability class would not restrict that move so News02 would be the parent after the move. If you want to implement your own template availability class to restrict that move then I would suggest adding a logic to restrict on subcategory as well. In this case news pages have a subcategory of news. Hope that helps |
| Comment by Rico Jansen [ 06/Mar/15 ] |
|
I think you misunderstood me, I'll try to clear it up.
And you want to move
The check done with the availibility is: And it should be: |
| Comment by Richard Gange [ 06/Mar/15 ] |
|
Thanks for that clarification. I do see the issue now. Regards |
| Comment by Trang Truong [ 06/May/15 ] |
|
@Richard |
| Comment by Nils Breunese [ 26/May/15 ] |
|
The original support issue was filed against Magnolia 4.5.24 with STK 2.0.22. |
| Comment by Trang Truong [ 02/Jun/15 ] |
|
This putted to lower priority in release 4.5.x and the reason for interrupted progress is I couldn't reproduce it at the time with STK 2.8.9. However, the affected version is provided 2.0.x now. |