Closed eboye closed 4 years ago
@eboye Thanks for reporting this. I will try to take a look at this in the coming days.
@eboye Could you provide the error messages you are getting (complete stack trace), package version, Laravel version, and PHP version?
Hi, thanks for quick reply.
This is the stacktrace from the log:
[2019-10-28 22:32:58] local.ERROR: Undefined index: latitude {"userId":1,"exception":"[object] (ErrorException(code: 0): Undefined index: latitude at /Users/eboye/htdocs/best/vendor/genealabs/nova-map-marker-field/src/MapMarker.php:209)
[stacktrace]
#0 /Users/eboye/htdocs/best/vendor/genealabs/nova-map-marker-field/src/MapMarker.php(209): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'Undefined index...', '/Users/eboye/ht...', 209, Array)
#1 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Support/helpers.php(1263): GeneaLabs\\NovaMapMarkerField\\MapMarker->GeneaLabs\\NovaMapMarkerField\\{closure}(NULL)
#2 /Users/eboye/htdocs/best/vendor/genealabs/nova-map-marker-field/src/MapMarker.php(214): with(NULL, Object(Closure))
#3 /Users/eboye/htdocs/best/vendor/laravel/nova/src/Fields/Field.php(705): GeneaLabs\\NovaMapMarkerField\\MapMarker->isRequired(Object(Laravel\\Nova\\Http\\Requests\\NovaRequest))
#4 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Support/Collection.php(1959): Laravel\\Nova\\Fields\\Field->jsonSerialize()
#5 [internal function]: Illuminate\\Support\\Collection->Illuminate\\Support\\{closure}(Object(GeneaLabs\\NovaMapMarkerField\\MapMarker))
#6 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Support/Collection.php(1967): array_map(Object(Closure), Array)
#7 [internal function]: Illuminate\\Support\\Collection->jsonSerialize()
#8 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php(71): json_encode(Array, 0)
#9 /Users/eboye/htdocs/best/vendor/symfony/http-foundation/JsonResponse.php(50): Illuminate\\Http\\JsonResponse->setData(Array)
#10 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php(31): Symfony\\Component\\HttpFoundation\\JsonResponse->__construct(Array, 200, Array)
#11 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php(95): Illuminate\\Http\\JsonResponse->__construct(Array, 200, Array, 0)
#12 /Users/eboye/htdocs/best/vendor/laravel/nova/src/Http/Controllers/UpdateFieldController.php(24): Illuminate\\Routing\\ResponseFactory->json(Array)
#13 [internal function]: Laravel\\Nova\\Http\\Controllers\\UpdateFieldController->index(Object(Laravel\\Nova\\Http\\Requests\\NovaRequest), 'users', '1')
#14 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#15 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('index', Array)
#16 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Laravel\\Nova\\Http\\Controllers\\UpdateFieldController), 'index')
#17 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
#18 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Router.php(680): Illuminate\\Routing\\Route->run()
#19 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#20 /Users/eboye/htdocs/best/vendor/laravel/nova/src/Http/Middleware/Authorize.php(18): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#21 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Laravel\\Nova\\Http\\Middleware\\Authorize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#22 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#23 /Users/eboye/htdocs/best/vendor/laravel/nova/src/Http/Middleware/BootTools.php(20): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#24 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Laravel\\Nova\\Http\\Middleware\\BootTools->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#25 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#26 /Users/eboye/htdocs/best/vendor/laravel/nova/src/Http/Middleware/DispatchServingNovaEvent.php(20): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#27 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Laravel\\Nova\\Http\\Middleware\\DispatchServingNovaEvent->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#28 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#29 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(43): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#30 /Users/eboye/htdocs/best/vendor/laravel/nova/src/Http/Middleware/Authenticate.php(31): Illuminate\\Auth\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#31 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Laravel\\Nova\\Http\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#32 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#33 /Users/eboye/htdocs/best/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(50): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#34 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Laravel\\Passport\\Http\\Middleware\\CreateFreshApiToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#35 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#36 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#37 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#38 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#39 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(75): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#40 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#41 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#42 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#43 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#44 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#45 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#46 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#47 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#48 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#49 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#50 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#51 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#52 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#53 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#54 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#55 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Router.php(682): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#56 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Router.php(657): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#57 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Router.php(623): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#58 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Router.php(612): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#59 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#60 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#61 /Users/eboye/htdocs/best/vendor/laravel/nova/src/Http/Middleware/ServeNova.php(26): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#62 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Laravel\\Nova\\Http\\Middleware\\ServeNova->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#63 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#64 /Users/eboye/htdocs/best/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#65 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#66 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#67 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#68 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#69 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#70 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#71 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#72 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#73 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#74 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#75 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#76 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#77 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#78 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#79 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#80 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#81 /Users/eboye/htdocs/best/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#82 /Users/eboye/htdocs/best/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#83 {main}
"}
0.1.15 is the version of genealabs/nova-map-marker-field 5.8.36 is the Laravel version 2.5.0 is the Nova version PHP is 7.3.11
Just encountered the same issue. Fixed after making the field required.
Cool, but it would be better if it could be nulled
same error
Would you guys mind retesting with release 0.2.2? I reworked a lot of the functionality, and from what I can tell it should work now.
Closing this for now, as it seems to work in my testing.
I've tried setting custom attributes and was debugging this for an hour and found out I need to make the field required so it works with custom atttributes.
works
this doesn't work