_SupportTicketTypes.aspx not Accessible


https://forum.kartris.com/Topic6879.aspx
Print Topic | Close Window

By shulemj - Thu 30 Mar 2017
I cannot reach the backend page _SupportTicketTypes.aspx, as it throws a Oops! error.

This is the log entry:
-----------------------------------------------------------------------------
>> Version:2.9005
>> URL:http://www.malchutjudaica.com/Admin/_SupportTicketTypes.aspx
>> Page:
-----------------------------------------------------------------------------
>> 3/29/2017 5:41:23 PM
>> 47.16.211.251
>> DESCRIPTION:
System.InvalidCastException: Operator '=' is not defined for type 'DBNull' and string "s".
at Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(Object Left, Object Right, Boolean TextCompare)
at ASP.admin__supporttickettypes_aspx.__DataBinding__control14(Object sender, EventArgs e)
at System.Web.UI.Control.OnDataBinding(EventArgs e)
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource)
at System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding)
at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
at System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data)
at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at Admin_SupportTicketTypes.LoadSupportTicketTypes()
at Admin_SupportTicketTypes.Page_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Any help would be greatly appreciated.
By Paul - Wed 5 Jul 2017
Try this... open up the /Admin/_SupportTicketTypes.aspx file (not the .vb one) and find this:

Visible='<%# Eval("STT_Level") = "s" %>

change to

Visible='<%# CkartrisDataManipulation.FixNullFromDB(Eval("STT_Level")) = "s" %>

(basically, we just call our FixNullFromDB function to turn Null values to zero length strings and stop the error).

It's happening because you have a null value in the STT_Level field of a record (or more than one record) in the tblKartrisSupportTicketTypes table. If you open that up, you could fix by just putting an 's' in there.

Basically the s or p was a distinction we put into Kartris to distinguish between support types available to premium/paid (p) customers or those that were sales/standard (s).
By shulemj - Wed 5 Jul 2017
Thanks, Paul.