Closed dathwa closed 6 months ago
Thank you for reporting this @dathwa, should be fixed in v2.7.1!
Hi @tobias-kuendig this is still broken after 2.7.1 update. Expecting an array, but receiving NULL.
[2024-05-20 10:40:20] development.ERROR: TypeError: OFFLINE\ResponsiveImages\Classes\Focuspoint\FocuspointExtension::OFFLINE\ResponsiveImages\Classes\Focuspoint\{closure}(): Argument #2 ($config) must be of type array, null given, called in \public_html\vendor\laravel\framework\src\Illuminate\Events\Dispatcher.php on line 421 and defined in \public_html\plugins\offline\responsiveimages\classes\focuspoint\FocuspointExtension.php:21
Stack trace:
#0 \public_html\vendor\laravel\framework\src\Illuminate\Events\Dispatcher.php(421): OFFLINE\ResponsiveImages\Classes\Focuspoint\FocuspointExtension::OFFLINE\ResponsiveImages\Classes\Focuspoint\{closure}('/plugins/offlin...', NULL)
#1 \public_html\vendor\laravel\framework\src\Illuminate\Events\Dispatcher.php(249): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}('system.extendCo...', Array)
#2 \public_html\vendor\october\rain\src\Events\PriorityDispatcher.php(112): Illuminate\Events\Dispatcher->dispatch('system.extendCo...', Array, false)
#3 \public_html\vendor\october\rain\src\Events\PriorityDispatcher.php(79): October\Rain\Events\PriorityDispatcher->fireEvent('system.extendCo...', Array, false)
#4 \public_html\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(338): October\Rain\Events\PriorityDispatcher->fire('system.extendCo...', Array)
#5 \public_html\modules\system\traits\ConfigMaker.php(78): Illuminate\Support\Facades\Facade::__callStatic('fire', Array)
#6 \public_html\modules\system\behaviors\SettingsModel.php(273): System\Behaviors\SettingsModel->makeConfig('C:\\htdocs\\aps.o...')
#7 [internal function]: System\Behaviors\SettingsModel->getFieldConfig()
#8 \public_html\vendor\october\rain\src\Extension\ExtendableTrait.php(504): call_user_func_array(Array, Array)
#9 \public_html\vendor\october\rain\src\Database\Model.php(293): October\Rain\Database\Model->extendableCall('getFieldConfig', Array)
#10 \public_html\plugins\offline\mall\models\PaymentGatewaySettings.php(50): October\Rain\Database\Model->__call('getFieldConfig', Array)
#11 \public_html\modules\system\controllers\Settings.php(169): OFFLINE\Mall\Models\PaymentGatewaySettings->getFieldConfig()
#12 \public_html\modules\system\controllers\Settings.php(97): System\Controllers\Settings->initWidgets(Object(OFFLINE\Mall\Models\PaymentGatewaySettings))
#13 \public_html\modules\system\traits\DependencyMaker.php(29): System\Controllers\Settings->update('offline', 'mall', 'payment_gateway...')
#14 \public_html\modules\backend\classes\Controller.php(392): Backend\Classes\Controller->makeCallMethod(Object(System\Controllers\Settings), 'update', Array)
#15 \public_html\modules\backend\classes\Controller.php(274): Backend\Classes\Controller->execPageAction('update', Array)
#16 \public_html\modules\backend\classes\BackendController.php(98): Backend\Classes\Controller->run('update', Array)
#17 \public_html\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(54): Backend\Classes\BackendController->run('system/settings...')
#18 \public_html\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(43): Illuminate\Routing\Controller->callAction('run', Array)
#19 \public_html\vendor\laravel\framework\src\Illuminate\Routing\Route.php(260): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Backend\Classes\BackendController), 'run')
#20 \public_html\vendor\laravel\framework\src\Illuminate\Routing\Route.php(205): Illuminate\Routing\Route->runController()
#21 \public_html\vendor\laravel\framework\src\Illuminate\Routing\Router.php(798): Illuminate\Routing\Route->run()
#22 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(141): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#23 \public_html\vendor\laravel\framework\src\Illuminate\Routing\Middleware\SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#24 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(180): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#25 \public_html\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#26 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(180): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#27 \public_html\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#28 \public_html\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))
#29 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(180): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#30 \public_html\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#31 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(180): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 \public_html\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#33 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(180): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#34 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#35 \public_html\vendor\laravel\framework\src\Illuminate\Routing\Router.php(799): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#36 \public_html\vendor\laravel\framework\src\Illuminate\Routing\Router.php(776): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#37 \public_html\vendor\laravel\framework\src\Illuminate\Routing\Router.php(740): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#38 \public_html\vendor\october\rain\src\Router\CoreRouter.php(32): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#39 \public_html\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(190): October\Rain\Router\CoreRouter->dispatch(Object(Illuminate\Http\Request))
#40 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(141): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#41 \public_html\plugins\offline\speedy\classes\middleware\CDNMiddleware.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#42 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(180): OFFLINE\Speedy\Classes\Middleware\CDNMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#43 \public_html\plugins\offline\speedy\classes\middleware\Http2Middleware.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#44 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(180): OFFLINE\Speedy\Classes\Middleware\Http2Middleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#45 \public_html\plugins\offline\responsiveimages\classes\ResponsiveImagesMiddleware.php(30): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#46 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(180): OFFLINE\ResponsiveImages\Classes\ResponsiveImagesMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 \public_html\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#48 \public_html\vendor\october\rain\src\Foundation\Http\Middleware\CheckForMaintenanceMode.php(23): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))
#49 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(180): October\Rain\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#50 \public_html\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#51 \public_html\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(165): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#52 \public_html\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(134): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#53 \public_html\index.php(43): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#54 {main}
I guess it's failing because /plugins/offline/mall/models/settings/fields_payment_gateways.yaml
is an empty file?
Thank you for the feedback! Give 2.7.2 a try. The empty yaml is certainly not ideal, but the plugin needs to be able to handle these cases.
Yip. That fixed it.
Hello. OCMS 3.6.18 Mall 3.2.1 ResponsiveImages 2.7
Navigating to
/backend/system/settings/update/offline/mall/payment_gateways_settings
I get the following error.Changing
Event::listen('system.extendConfigFile', function (string $path, array $config) {
toEvent::listen('system.extendConfigFile', function (string $path, array $config = null) {
seems to fix.