4-Roads / FourRoads.TelligentCommunity

A collection of plugins to extend the functionality of the Telligent Community platform
MIT License
6 stars 9 forks source link

Rules.Triggers.UserProfileCompleted.EventsOnBeforeUpdate #41

Open epernst opened 6 years ago

epernst commented 6 years ago

Using the 10.1 branch I am getting this exception error in TC 10.1.6, whenever I try to delete a member.

NotSafeCsException: Logged Error ---> FourRoads.Common.TelligentCommunity.Components.TCException: EventsOnBeforeUpdate failed for userid:10254 ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at FourRoads.TelligentCommunity.Rules.Triggers.UserProfileCompleted.EventsOnBeforeUpdate(UserBeforeUpdateEventArgs userBeforerUpdateEventArgs) --- End of inner exception stack trace --- --- End of inner exception stack trace --- at FourRoads.Common.TelligentCommunity.Components.TCException.NotSafeCsException..ctor(CSExceptionType t, String internalMessage, Exception inner) at FourRoads.Common.TelligentCommunity.Components.TCException.Log() at FourRoads.TelligentCommunity.Rules.Triggers.UserProfileCompleted.EventsOnBeforeUpdate(UserBeforeUpdateEventArgs userBeforerUpdateEventArgs) at Telligent.Evolution.Extensibility.Api.Version1.UserBeforeUpdateEventHandler.Invoke(UserBeforeUpdateEventArgs e) at Telligent.Evolution.Api.Events.UserEventExecutor.OnBeforeUpdate(User user, Boolean isRenamed, String renamedUsername) at Telligent.Evolution.Components.UserDataService.UpdateUser(User user) at Telligent.Evolution.Api.Services.UserService.DeleteUser(Nullable1 id, String username, Nullable1 reassignedUserId, String reassignedUserName, Boolean deleteAllContent) at Telligent.Evolution.Extensibility.Api.Version1.Users.Delete(UsersDeleteOptions options) at Telligent.Evolution.Rest.Resources.Users.UserController.Delete(UserDeleteRequest request) at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Telligent.Evolution.Rest.Infrastructure.ActionBinding.Invoke(IController target, IRestRequest request) at Telligent.Evolution.Rest.Infrastructure.ActionDispatcher.ProcessRequest(RequestContext context, IActionBinding binding) at Telligent.Evolution.Rest.Infrastructure.RestHttpHandler.ProcessRequest() at Telligent.Evolution.Rest.Resources.Urls.RESTBatchRoutePlugin.Execute(String contentType, BatchRequest batchRequest, HttpRequestBase request, String[] responses) at Telligent.Evolution.Rest.Resources.Urls.RESTBatchRoutePlugin.<>c__DisplayClass14_1.<Register>b__2(BatchRequest r) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_01.b1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>cDisplayClass176_0.b__0(Object ) at System.Threading.Tasks.Task.Execute() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) at System.Threading.ThreadPoolWorkQueue.Dispatch()

bar8s commented 6 years ago

hi @epernst - I've made a change to this and a similar plugin re the temp store, if you could pull down the changes and let me know how you get on that would be great.

epernst commented 6 years ago

Hi bar8s, What do you mean by "temp store"?

bar8s commented 6 years ago

The dictionary of user details, holding the details between the before and after events of the user update.