在調用CMSAbstractWebPart類的GetValue方法的時候出錯。
namespace CMS.PortalEngine.Web.UI
{
/// <summary>
/// Base class for the web part controls.
/// </summary>
[DebuggerDisplay("CMSAbstractWebPart({WebPartID})")]
public abstract partial class CMSAbstractWebPart : AbstractUserControl, ICMSVariantsControl, ITimeZoneManager, IDataControl, ISimpleDataContainer, IExceptionHandler
/// Returns the value of the given web part property property.
/// <param name="propertyName">Property name</param>
public virtual object GetValue(string propertyName)
return GetValueInternal(propertyName, true);
}
https://devnet.kentico.com/questions/invalid-sql-query-error-on-a-page
Go to settings -> System -> Debug and enable SQL query debug.

Now go to Debug -> SQL queries tab and now you will be able to see detail error log for SQL
Remember to check "Show complete context"
最後發現是一個名為orderby的property存儲了非法字元&