OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.37k stars 2.38k forks source link

OrchardCore throw a exception "ArgumentNullException: Value cannot be null. (Parameter 'source')" when it call "Orchard.ContentQueryAsync(query, queryParams)"方法 #16688

Closed effapp closed 1 week ago

effapp commented 2 weeks ago

Describe the bug

OrchardCore throw a exception "ArgumentNullException: Value cannot be null. (Parameter 'source')" when it call "Orchard.ContentQueryAsync(query, queryParams)"方法

a pieces of code as follows:

var queryParams = new Dictionary<string, object>() { { "size", fetchCount }, { "from", from } }; string query = (string)Model.ContentItem.Content.ContentFeedByTaxonomy.Items.Value; var items = await Orchard.ContentQueryAsync(query, queryParams); // throw exception : ArgumentNullException: Value cannot be null. (Parameter 'source')

note: the state "var items = await Orchard.ContentQueryAsync(query);" can execute correctly.

Orchard Core version

1.8.3 and 1.8.4

Logs and screenshots

image

effapp commented 1 week ago

The issue has been resolved.

Sorry, the query DSL code was missing one ","