Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

($model) must be of type array, null given, #48

Closed
pierzo opened this issue Nov 10, 2022 · 1 comment
Closed

($model) must be of type array, null given, #48

pierzo opened this issue Nov 10, 2022 · 1 comment

Comments

@pierzo
Copy link

pierzo commented Nov 10, 2022

Hi,
Winter version 1.2.1
Laravel Framework 9.39.0 - Winter CMS
PHP 8.0.

After I try to save form I get:

TypeError: Winter\Builder\Behaviors\IndexModelFormOperations::updateJsonable(): Argument #1 ($model) must be of type array, null given, called in /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/plugins/winter/builder/behaviors/IndexModelFormOperations.php on line 78 and defined in /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/plugins/winter/builder/behaviors/IndexModelFormOperations.php:296

Full stack trace

TypeError: Winter\Builder\Behaviors\IndexModelFormOperations::updateJsonable(): Argument #1 ($model) must be of type array, null given, called in /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/plugins/winter/builder/behaviors/IndexModelFormOperations.php on line 78 and defined in /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/plugins/winter/builder/behaviors/IndexModelFormOperations.php:296
Stack trace:
#0 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/plugins/winter/builder/behaviors/IndexModelFormOperations.php(78): Winter\Builder\Behaviors\IndexModelFormOperations->updateJsonable(NULL, Array, Array)
#1 [internal function]: Winter\Builder\Behaviors\IndexModelFormOperations->onModelFormSave()
#2 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/winter/storm/src/Extension/ExtendableTrait.php(439): call_user_func_array(Array, Array)
#3 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/modules/backend/classes/Controller.php(184): Backend\Classes\Controller->extendableCall('onModelFormSave', Array)
#4 [internal function]: Backend\Classes\Controller->__call('onModelFormSave', Array)
#5 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/modules/backend/classes/Controller.php(629): call_user_func_array(Array, Array)
#6 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/modules/backend/classes/Controller.php(479): Backend\Classes\Controller->runAjaxHandler('onModelFormSave')
#7 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/modules/backend/classes/Controller.php(277): Backend\Classes\Controller->execAjaxHandlers()
#8 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/modules/backend/classes/BackendController.php(171): Backend\Classes\Controller->run('index', Array)
#9 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Backend\Classes\BackendController->run('winter/builder')
#10 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/modules/backend/classes/BackendController.php(119): Illuminate\Routing\Controller->callAction('run', Array)
#11 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Backend\Classes\BackendController->callAction('run', Array)
#12 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Routing/Route.php(260): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Backend\Classes\BackendController), 'run')
#13 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()
#14 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Routing/Router.php(727): Illuminate\Routing\Route->run()
#15 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#16 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/modules/backend/classes/BackendController.php(68): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#17 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(162): Backend\Classes\BackendController->Backend\Classes\{closure}(Object(Illuminate\Http\Request), Object(Closure))
#18 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#19 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#20 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#21 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#22 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#23 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest(Object(Illuminate\Http\Request), Object(Illuminate\Session\Store), Object(Closure))
#24 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#25 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#26 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#27 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#28 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#29 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#30 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Routing/Router.php(728): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#31 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Routing/Router.php(705): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#32 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Routing/Router.php(669): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#33 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/winter/storm/src/Router/CoreRouter.php(20): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#34 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(190): Winter\Storm\Router\CoreRouter->dispatch(Object(Illuminate\Http\Request))
#35 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#36 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#37 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/winter/storm/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php(25): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))
#38 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Winter\Storm\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#39 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/winter/storm/src/Foundation/Http/Middleware/CheckForTrustedProxies.php(56): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#40 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Winter\Storm\Foundation\Http\Middleware\CheckForTrustedProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#41 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/winter/storm/src/Http/Middleware/TrustHosts.php(46): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#42 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Winter\Storm\Http\Middleware\TrustHosts->handle(Object(Illuminate\Http\Request), Object(Closure))
#43 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#44 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#45 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#46 /usr/home/Eternia/domains/eternia.usermd.net/public_html/wprzyczepy/index.php(43): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#47 {main}
@bennothommo
Copy link
Member

@pierzo I've released a new version of the plugin which should contain a bug fix for this issue. Please let me know if the new release does not fix the issue and we'll re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants