U4-11462 Error when using Simple Injector - 'The Tree controller is missing the Umbraco.Web.Trees.TreeAttribute attribute'
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
<add application="settings" alias="scripts" title="Scripts" type="Umbraco.Web.Trees.ScriptTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="Umbraco.Web.Trees.SettingsDictionaryTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6"
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="Umbraco.Web.Trees.DictionaryTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add alias="dictionary" application="settings"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<add application="settings" alias="stylesheetProperty" title="Stylesheet Property" type="umbraco.loadStylesheetProperty, umbraco" iconClosed="" iconOpen="" initialize="false" sortOrder="0" />
|
||||
<add application="settings" alias="scripts" title="Scripts" type="Umbraco.Web.Trees.ScriptTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4" />
|
||||
<add application="settings" alias="languages" title="Languages" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.LanguageTreeController, umbraco" sortOrder="5" />
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="Umbraco.Web.Trees.SettingsDictionaryTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6" />
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="Umbraco.Web.Trees.DictionaryTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6" />
|
||||
<add initialize="true" sortOrder="7" alias="mediaTypes" application="settings" title="Media Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MediaTypeTreeController, umbraco" />
|
||||
<add initialize="true" sortOrder="8" alias="contentBlueprints" application="settings" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.ContentBlueprintTreeController, umbraco" />
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<add application="settings" alias="stylesheetProperty" title="Stylesheet Property" type="umbraco.loadStylesheetProperty, umbraco" iconClosed="" iconOpen="" initialize="false" sortOrder="0" />
|
||||
<add application="settings" alias="scripts" title="Scripts" type="Umbraco.Web.Trees.ScriptTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4" />
|
||||
<add application="settings" alias="languages" title="Languages" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.LanguageTreeController, umbraco" sortOrder="5" />
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="Umbraco.Web.Trees.SettingsDictionaryTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6" />
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="Umbraco.Web.Trees.DictionaryTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6" />
|
||||
<add initialize="true" sortOrder="7" alias="mediaTypes" application="settings" title="Media Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MediaTypeTreeController, umbraco" />
|
||||
<add initialize="true" sortOrder="8" alias="contentBlueprints" application="settings" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.ContentBlueprintTreeController, umbraco" />
|
||||
<!--Developer-->
|
||||
|
||||
@@ -5,11 +5,32 @@ using umbraco.BusinessLogic.Actions;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
public class DictionaryTreeBaseController : TreeController
|
||||
[UmbracoTreeAuthorize(Constants.Trees.Dictionary)]
|
||||
[Mvc.PluginController("UmbracoTrees")]
|
||||
[CoreTree]
|
||||
[Tree(Constants.Applications.Settings, Constants.Trees.Dictionary, null, sortOrder: 3)]
|
||||
public class DictionaryTreeController : TreeController
|
||||
{
|
||||
protected override TreeNode CreateRootNode(FormDataCollection queryStrings)
|
||||
{
|
||||
var root = base.CreateRootNode(queryStrings);
|
||||
|
||||
// the default section is settings, falling back to this if we can't
|
||||
// figure out where we are from the querystring parameters
|
||||
var section = Constants.Applications.Settings;
|
||||
if (queryStrings["application"] != null)
|
||||
section = queryStrings["application"];
|
||||
|
||||
// this will load in a custom UI instead of the dashboard for the root node
|
||||
root.RoutePath = $"{section}/{Constants.Trees.Dictionary}/list";
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The method called to render the contents of the tree structure
|
||||
/// </summary>
|
||||
@@ -1,24 +0,0 @@
|
||||
using System.Net.Http.Formatting;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
[UmbracoTreeAuthorize(Constants.Trees.Dictionary)]
|
||||
[Tree(Constants.Applications.Settings, Constants.Trees.Dictionary, null, sortOrder: 3)]
|
||||
[Mvc.PluginController("UmbracoTrees")]
|
||||
[CoreTree]
|
||||
public class SettingsDictionaryTreeController : DictionaryTreeBaseController
|
||||
{
|
||||
protected override TreeNode CreateRootNode(FormDataCollection queryStrings)
|
||||
{
|
||||
var root = base.CreateRootNode(queryStrings);
|
||||
|
||||
// this will load in a custom UI instead of the dashboard for the root node
|
||||
root.RoutePath = $"{Constants.Applications.Settings}/{Constants.Trees.Dictionary}/list";
|
||||
|
||||
return root;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
using System.Net.Http.Formatting;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
[UmbracoTreeAuthorize(Constants.Trees.Dictionary)]
|
||||
[Tree(Constants.Applications.Translation, Constants.Trees.Dictionary, null, sortOrder: 3)]
|
||||
[Mvc.PluginController("UmbracoTrees")]
|
||||
[CoreTree]
|
||||
public class TranslationDictionaryTreeController : DictionaryTreeBaseController
|
||||
{
|
||||
protected override TreeNode CreateRootNode(FormDataCollection queryStrings)
|
||||
{
|
||||
var root = base.CreateRootNode(queryStrings);
|
||||
|
||||
// this will load in a custom UI instead of the dashboard for the root node
|
||||
root.RoutePath = $"{Constants.Applications.Translation}/{Constants.Trees.Dictionary}/list";
|
||||
|
||||
return root;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -528,9 +528,7 @@
|
||||
<Compile Include="Models\Mapping\PropertyTypeGroupResolver.cs" />
|
||||
<Compile Include="Security\Identity\PreviewAuthenticationMiddleware.cs" />
|
||||
<Compile Include="SingletonHttpContextAccessor.cs" />
|
||||
<Compile Include="Trees\DictionaryTreeBaseController.cs" />
|
||||
<Compile Include="Trees\SettingsDictionaryTreeController.cs" />
|
||||
<Compile Include="Trees\TranslationDictionaryTreeController.cs" />
|
||||
<Compile Include="Trees\DictionaryBaseController.cs" />
|
||||
<Compile Include="Trees\MacroTreeController.cs" />
|
||||
<Compile Include="Trees\UserTreeController.cs" />
|
||||
<Compile Include="Suspendable.cs" />
|
||||
|
||||
Reference in New Issue
Block a user