.Add(S["Colors"], "5", t => t
.Action("List", adminControllerName, new { area = "OrchardCore.Contents", ContentType = "Color" })
.Permission(CommonPermissions.EditContent)
.LocalNav()
var userData = await Orchard.GetUserByIdAsync(User.Identity.Name);
(using decoupled razor pages) and it would return all of the info and fields for that user. However, when I create a new user in v1.0.0 or v1.1.0, all I get is a null when using this method. The method works for the older users created in the previous version, but this method doesn't seem to work for users created in the new version for some reason. Is there another method or process for retrieving custom fields/info for users?
.TagHelpers
from the _ViewImports
Is there a way to call Orchard.DisplayAsync
from a page in the Pages/ folder? I have a page that looks something like this:
@page "/{item}/form"
@inject OrchardCore.IOrchardHelper Orchard
@{
var itemPath = ViewContext.RouteData.Values["item"];
var contentItem = await Orchard.GetContentItemByHandleAsync("slug:" + itemPath, true);
}
<div>
Have some content:
@await Orchard.DisplayAsync(contentItem);
</div>
And it can't seem to find DisplayAsync on Orchard? 'IOrchardHelper' does not contain a definition for 'DisplayAsync' and the best extension method overload 'OrchardRazorHelperExtensions.DisplayAsync(IOrchardDisplayHelper, ContentItem, string, string, IUpdateModel)' requires a receiver of type 'IOrchardDisplayHelper'
. Is there a way to inject an instance of IOrchardDisplayHelper instead of IOrchardHelper?
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware|ERROR|An unhandled exception has occurred while executing the request. System.Exception: Shape type 'CustomEmailTask_Fields_Design' not found
. And then there is probably like 500 or more lines of stack trace data. Again, the workflows work great locally. I am only running in to this problem on my dev/prod server.
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware|ERROR|An unhandled exception has occurred while executing the request. System.Exception: Shape type 'CustomEmailTask_Fields_Design' not found
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware|ERROR|An exception was thrown attempting to execute the error handler. System.InvalidOperationException: Multiple handlers matched. The following handlers matched route data and had all constraints satisfied: Void OnGet(), Void OnGet()
2021-10-22 15:46:07.9675|Default|00-e58340824438a948a758976c2522db95-31eb2ee35aa67849-00||Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware|ERROR|An unhandled exception has occurred while executing the request. Microsoft.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'PKDocument3214EC071B675274'. Cannot insert duplicate key in object 'dbo.Document'. The duplicate key value is (21).
Any ideas?
Almost there now with http://new.nogginbox.co.uk/
But my menu tag is getting rendered in the HTML as:
<menu alias="alias:main-menu" cache-id="main-menu" cache-fixed-duration="00:05:00" cache-tag="alias:main-menu" />