Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguity in LocalizedTaxonomyController action names #8785

Merged
merged 10 commits into from
May 16, 2024
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.Routing;
using Orchard.ContentManagement.MetaData;
using Orchard.Environment.Extensions;
using Orchard.Localization.Services;
Expand All @@ -25,10 +25,9 @@ public AdminLocalizedTaxonomyController(IContentDefinitionManager contentDefinit
}

[OutputCache(NoStore = true, Duration = 0)]
public new ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
public override ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
AdminFilter.Apply(_requestContext);
AndreaPiovanelli marked this conversation as resolved.
Show resolved Hide resolved

return GetTaxonomyInternal(contentTypeName, taxonomyFieldName, contentId, culture, selectedValues);
return base.GetTaxonomy(contentTypeName, taxonomyFieldName, contentId, culture, selectedValues);
}
}
}
}
AndreaPiovanelli marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public LocalizedTaxonomyController(
}

[OutputCache(NoStore = true, Duration = 0)]
public ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
public virtual ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
return GetTaxonomyInternal(contentTypeName, taxonomyFieldName, contentId, culture, selectedValues);
}

protected ActionResult GetTaxonomyInternal (string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
protected ActionResult GetTaxonomyInternal(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
var viewModel = new TaxonomyFieldViewModel();
bool autocomplete = false;
var contentDefinition = _contentDefinitionManager.GetTypeDefinition(contentTypeName);
Expand Down