Open Closed

CmsPage : When content is null , Markdig will occur a error #2028


User avatar
0
changyenshung created
  • ABP Framework version: v4.4.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
An unhandled exception occurred while processing the request.
ArgumentNullException: Value cannot be null. (Parameter 'markdown')
Markdig.Helpers.ThrowHelper.ArgumentNullException_markdown()

  • Steps to reproduce the issue:"

1.Create application use abp suite

2.Insert a data by MSSQL ID | Tenant | Title | Slug | Content|..... --------------|:-----:|-----:| ----:|------------------------|--------- 949e1344-43e2-5504-3ef1-39ffa4d31896|NULL|申辦服務|service|NULL |....| 3.open browser : https://localhost:44304/pages/service, a exception will occur

  1. if page's content is not null, the page will show correct.

        public Task<string> RenderAsync(string rawMarkdown)
        {
        
            //if rawMarkdown is null ,will throw exception
            return Task.FromResult(

                Markdown.ToHtml(rawMarkdown, MarkdownPipeline));
        }

1 Answer(s)
  • User Avatar
    1
    enisn created
    Support Team .NET Developer

    It's an unexpected behavior. We'll fix it in next release.

    So your credit is refunded.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11