kirschbaum-development / nova-inline-relationship

A package to present relationships as inline properties in Nova.
MIT License
198 stars 83 forks source link

Call to undefined method stdClass:forceFill() when trying to update without making any changes or creating with a HasMany object present #123

Closed nicolasloontjens closed 10 months ago

nicolasloontjens commented 1 year ago

With Nova version 4.25.1 and this package's version 2.0.0, I'm not experiencing any trouble but after upgrading Nova to 4.26.3 I'm getting the error in title

riptin commented 1 year ago

Getting similar error: Call to undefined method stdClass::forceFill() with MorphMany. using Nova 4.27.12

brain82 commented 1 year ago

+1

HeadStudios commented 1 year ago

+1 Over here too - full stack trace:

[2023-11-02 18:40:25] production.ERROR: Call to undefined method stdClass::forceFill() {"userId":1,"exception":"[object] (Error(code: 0): Call to undefined method stdClass::forceFill() at /home/forge/rrdevours.monster/vendor/laravel/nova/src/Fields/Field.php:487) [stacktrace]

0 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Fields/Field.php(471): Laravel\Nova\Fields\Field->fillModelWithData()

1 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Support/helpers.php(306): Laravel\Nova\Fields\Field->Laravel\Nova\Fields\{closure}()

2 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Fields/Field.php(468): tap()

3 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Fields/Field.php(453): Laravel\Nova\Fields\Field->fillAttributeFromRequest()

4 /home/forge/rrdevours.monster/vendor/kirschbaum-development/nova-inline-relationship/src/NovaInlineRelationship.php(256): Laravel\Nova\Fields\Field->fillAttribute()

5 /home/forge/rrdevours.monster/vendor/kirschbaum-development/nova-inline-relationship/src/NovaInlineRelationship.php(549): KirschbaumDevelopment\NovaInlineRelationship\NovaInlineRelationship->getValueFromField()

6 [internal function]: KirschbaumDevelopment\NovaInlineRelationship\NovaInlineRelationship->KirschbaumDevelopment\NovaInlineRelationship\{closure}()

7 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(560): array_map()

8 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(768): Illuminate\Support\Arr::map()

9 /home/forge/rrdevours.monster/vendor/kirschbaum-development/nova-inline-relationship/src/NovaInlineRelationship.php(544): Illuminate\Support\Collection->map()

10 [internal function]: KirschbaumDevelopment\NovaInlineRelationship\NovaInlineRelationship->KirschbaumDevelopment\NovaInlineRelationship\{closure}()

11 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(560): array_map()

12 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(768): Illuminate\Support\Arr::map()

13 /home/forge/rrdevours.monster/vendor/kirschbaum-development/nova-inline-relationship/src/NovaInlineRelationship.php(540): Illuminate\Support\Collection->map()

14 /home/forge/rrdevours.monster/vendor/kirschbaum-development/nova-inline-relationship/src/NovaInlineRelationship.php(390): KirschbaumDevelopment\NovaInlineRelationship\NovaInlineRelationship->getResourceResponse()

15 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Fields/Field.php(453): KirschbaumDevelopment\NovaInlineRelationship\NovaInlineRelationship->fillAttributeFromRequest()

16 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Fields/Field.php(436): Laravel\Nova\Fields\Field->fillAttribute()

17 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Fields/Field.php(412): Laravel\Nova\Fields\Field->fillInto()

18 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(60): Laravel\Nova\Fields\Field->fill()

19 [internal function]: Illuminate\Support\HigherOrderCollectionProxy->Illuminate\Support\{closure}()

20 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(560): array_map()

21 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(768): Illuminate\Support\Arr::map()

22 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(59): Illuminate\Support\Collection->map()

23 /home/forge/rrdevours.monster/vendor/laravel/nova/src/FillsFields.php(100): Illuminate\Support\HigherOrderCollectionProxy->__call()

24 /home/forge/rrdevours.monster/vendor/laravel/nova/src/FillsFields.php(37): Laravel\Nova\Resource::fillFields()

25 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Http/Controllers/ResourceUpdateController.php(46): Laravel\Nova\Resource::fillForUpdate()

26 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(30): Laravel\Nova\Http\Controllers\ResourceUpdateController->Laravel\Nova\Http\Controllers\{closure}()

27 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Http/Controllers/ResourceUpdateController.php(37): Illuminate\Database\Connection->transaction()

28 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Laravel\Nova\Http\Controllers\ResourceUpdateController->__invoke()

29 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\Routing\Controller->callAction()

30 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\Routing\ControllerDispatcher->dispatch()

31 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()

32 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Routing/Router.php(798): Illuminate\Routing\Route->run()

33 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Routing\Router->Illuminate\Routing\{closure}()

34 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Http/Middleware/Authorize.php(18): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

35 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Laravel\Nova\Http\Middleware\Authorize->handle()

36 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

37 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Http/Middleware/Authenticate.php(31): Illuminate\Auth\Middleware\Authenticate->handle()

38 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Laravel\Nova\Http\Middleware\Authenticate->handle()

39 /home/forge/rrdevours.monster/vendor/whitecube/nova-flexible-content/src/Http/Middleware/InterceptFlexibleAttributes.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

40 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Whitecube\NovaFlexibleContent\Http\Middleware\InterceptFlexibleAttributes->handle()

41 /home/forge/rrdevours.monster/vendor/formfeed-uk/nova-subfield-dependson/src/Http/Middleware/InterceptSubfieldDependsOn.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

42 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Formfeed\SubfieldDependsOn\Http\Middleware\InterceptSubfieldDependsOn->handle()

43 /home/forge/rrdevours.monster/vendor/formfeed-uk/nova-dependable-panel/src/Http/Middleware/InterceptDisplayFields.php(34): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

44 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Formfeed\DependablePanel\Http\Middleware\InterceptDisplayFields->handle()

45 /home/forge/rrdevours.monster/vendor/formfeed-uk/nova-dependable-panel/src/Http/Middleware/InterceptValidationFailure.php(40): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

46 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Formfeed\DependablePanel\Http\Middleware\InterceptValidationFailure->handle()

47 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Http/Middleware/BootTools.php(20): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

48 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Laravel\Nova\Http\Middleware\BootTools->handle()

49 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Http/Middleware/DispatchServingNovaEvent.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

50 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Laravel\Nova\Http\Middleware\DispatchServingNovaEvent->handle()

51 /home/forge/rrdevours.monster/vendor/inertiajs/inertia-laravel/src/Middleware.php(87): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

52 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Inertia\Middleware->handle()

53 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

54 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()

55 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

56 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\View\Middleware\ShareErrorsFromSession->handle()

57 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

58 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()

59 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Session\Middleware\StartSession->handle()

60 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

61 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()

62 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

63 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\EncryptCookies->handle()

64 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

65 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Routing/Router.php(797): Illuminate\Pipeline\Pipeline->then()

66 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Routing/Router.php(776): Illuminate\Routing\Router->runRouteWithinStack()

67 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Routing/Router.php(740): Illuminate\Routing\Router->runRoute()

68 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Routing/Router.php(729): Illuminate\Routing\Router->dispatchToRoute()

69 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(190): Illuminate\Routing\Router->dispatch()

70 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()

71 /home/forge/rrdevours.monster/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

72 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Livewire\DisableBrowserCache->handle()

73 /home/forge/rrdevours.monster/vendor/laravel/nova/src/Http/Middleware/ServeNova.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

74 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Laravel\Nova\Http\Middleware\ServeNova->handle()

75 /home/forge/rrdevours.monster/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

76 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()

77 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

78 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()

79 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()

80 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

81 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()

82 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\TrimStrings->handle()

83 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

84 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()

85 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

86 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()

87 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

88 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\HandleCors->handle()

89 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

90 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\TrustProxies->handle()

91 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

92 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Pipeline\Pipeline->then()

93 /home/forge/rrdevours.monster/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()

94 /home/forge/rrdevours.monster/public/index.php(51): Illuminate\Foundation\Http\Kernel->handle()

95 {main}

"}

forcefill