umbraco / Umbraco.UIBuilder.Issues

Back office UI builder for Umbraco
3 stars 2 forks source link

Childcollection with int as ID breaks after upgrade to 13.1.2 #99

Closed patlit closed 4 months ago

patlit commented 4 months ago

After upgrading to UI Builder 13.1.2 my childcollection (using custom repositories) crashes with error "startIndex ('-28') must be a non-negative value. (Parameter 'startIndex') Actual value was -28."

Definition: image

api call "FindEntites" gives server error 500: image Payload: image

Response: { "ExceptionMessage": "startIndex ('-28') must be a non-negative value. (Parameter 'startIndex')\r\nActual value was -28.", "ExceptionType": "System.ArgumentOutOfRangeException, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e", "StackTrace": " at System.ArgumentOutOfRangeException.ThrowNegative[T](T value, String paramName)\r\n at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length)\r\n at Umbraco.UIBuilder.Services.EntityService.FindEntities(CollectionConfig collection, Object parentId, Int32 pageNumber, Int32 pageSize, String query, IDictionary`2 filters, String dataViewAlias, String orderBy, String orderDirection)\r\n at Umbraco.UIBuilder.Web.Controllers.Api.UIBuilderApiController.FindEntities(FindEntitiesPostModel postModel)\r\n at lambda_method11927(Closure, Object, Object[])\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gLogged|12_1(ControllerActionInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()\r\n--- End of stack trace from previous location ---\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)" }

Any help would be appreciated, we plan to go live with the site in 2 weeks and this needs to work.

Best regards Patrik

patlit commented 4 months ago

Hi, any thoughts on this? Do we need to downgrade UI Builder? Best regards Patrik

acoumb commented 4 months ago

Hi @patlit ,

I will release a patch version with a fix for this today.

Regards, Adrian

patlit commented 4 months ago

Thank you Adrian! That will be perfect, was getting a bit nervous for our release on next tuesday :)

acoumb commented 4 months ago

@patlit version 13.1.3 is now on NuGet.

patlit commented 4 months ago

@acoumb Thanks Adrian! Just tested and i think everything works as expected now. Best regards Patrik