The Community is now in read-only mode to prepare for the launch of the new Flexera Community. During this time, you will be unable to register, log in, or access customer resources. Click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unexpected error removing question condition

TeriStevenson
By
Level 9

I'm trying to remove a condition on a question and get an unexpected error.  the websit.log shows the following error.  I wasn't able to find any previous forum posts for this.  Has anyone experienced this? This is happening for any question I try to remove a condition on.  2021 R2 version

Unhandled Exception http://AppPortal Server/esd/admin/EditQA.aspx?QuestionID=2577  There is no row at position 0. at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex)
at ASP.admin_editqa_aspx.PopulateConditionalQuestionValues(Int32 iQuestionID)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e)
at System.Web.UI.Page.RaiseChangedEvents()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

The websitMVC.log has a little more information

Error: Min (2) must be less than or equal to max (-1) in a Range object. at System.Data.Select.GetBinaryFilteredRecords()
at System.Data.Select.SelectRows()
at SelfService.Checkout.DisplayQuestions(DataTable dtQuestionTemplates, DataTable dtTarget)
at SelfService.Questions.GetQuestions(DataTable dtCart, DataTable dtTarget, List`1 fullCollectionMembership, Hashtable propertyList, Hashtable groupList, Boolean isAdminAccessLevel, String organistionalUnit)
at AppPortal.Infrastructure.Repositories.QuestionRepository.GetQuestions(DataTable dtCart, DataTable dtTarget, IEnumerable`1 fullCollectionMembership, Hashtable propertyList, Hashtable groupList, Boolean isAdminAccessLevel, String organistionalUnit)
at Castle.Proxies.Invocations.IQuestionRepository_GetQuestions_1.InvokeMethodOnTarget()
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at AppPortal.Infrastructure.DependencyResolution.UnitTestGeneratorInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.IQuestionRepositoryProxy.GetQuestions(DataTable dtCart, DataTable dtTarget, IEnumerable`1 fullCollectionMembership, Hashtable propertyList, Hashtable groupList, Boolean isAdminAccessLevel, String organistionalUnit)
at AppPortal.Infrastructure.Services.QuestionService.GetQuestions(DataTable dtCart, DataTable dtTarget, IEnumerable`1 fullCollectionMembership, Hashtable propertyList, Hashtable groupList, Boolean isAdminAccessLevel, String organistionalUnit, Int32 languageId)
at Castle.Proxies.Invocations.IQuestionService_GetQuestions_2.InvokeMethodOnTarget()
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at AppPortal.Infrastructure.DependencyResolution.UnitTestGeneratorInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.IQuestionServiceProxy.GetQuestions(DataTable dtCart, DataTable dtTarget, IEnumerable`1 fullCollectionMembership, Hashtable propertyList, Hashtable groupList, Boolean isAdminAccessLevel, String organistionalUnit, Int32 languageId)
at AppPortal.MVC.Controllers.CheckoutController.Questions(String packageIds)
at AppPortal.MVC.Controllers.CheckoutController.NextTargetView(Target2 target)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_0.<InvokeActionMethodFilterAsynchronouslyRecursive>b__0()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_6.<BeginInvokeAction>b__4()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult)

(1) Solution

CharlesW
By Level 12 Flexeran
Level 12 Flexeran

Teri,
    I don't see a way around this in the UI.. I might be able to edit the page to fix the issue.. In the meantime, you can use the following to remove the question condition from the question:

delete from WD_ConditionalQuestion where QuestionID_FK = <questionID>

Where <questionID> is the question ID of the question that you want to remove the condition from.

Charles

View solution in original post

(3) Replies

CharlesW
By Level 12 Flexeran
Level 12 Flexeran

Teri,
      I'm seeing the same behavior. Let me see if I can work around it in the UI. If not, then I'm sure that we should be able to write a query to remove the question.

Thanks,
Charles

CharlesW
By Level 12 Flexeran
Level 12 Flexeran

Teri,
    I don't see a way around this in the UI.. I might be able to edit the page to fix the issue.. In the meantime, you can use the following to remove the question condition from the question:

delete from WD_ConditionalQuestion where QuestionID_FK = <questionID>

Where <questionID> is the question ID of the question that you want to remove the condition from.

Charles

Thank you Charles!