Наличие проблемы со списком внутренних фильтров - PullRequest
0 голосов
/ 23 октября 2019

Для двух моих дистрибутивов у меня возникла уникальная проблема при фильтрации любого списка моделей бэкэнда. У них разные плагины. Чаще всего они оба имеют собственные плагины, которые я сначала создал с помощью плагина Builder. Они также размещены на разных серверах Linux.

enter image description here

enter image description here

Ошибка:

Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Return value of Backend\Widgets\Lists::putUserPreference() must be an instance of Backend\Traits\void, none returned in /home/deltarv/public_html/modules/backend/traits/PreferenceMaker.php

Вот трассировка журнала:

#0 /home/deltarv/public_html/modules/backend/widgets/Lists.php(1598): Backend\Widgets\Lists->putUserPreference('visible', Array)
#1 [internal function]: Backend\Widgets\Lists->onApplySetup()
#2 /home/deltarv/public_html/modules/backend/classes/Controller.php(657): call_user_func_array(Array, Array)
#3 /home/deltarv/public_html/modules/backend/classes/Controller.php(601): Backend\Classes\Controller->runAjaxHandlerForWidget(Object(Backend\Widgets\Lists), 'onApplySetup')
#4 /home/deltarv/public_html/modules/backend/classes/Controller.php(470): Backend\Classes\Controller->runAjaxHandler('list::onApplySe...')
#5 /home/deltarv/public_html/modules/backend/classes/Controller.php(267): Backend\Classes\Controller->execAjaxHandlers()
#6 /home/deltarv/public_html/modules/backend/classes/BackendController.php(161): Backend\Classes\Controller->run('index', Array)
#7 [internal function]: Backend\Classes\BackendController->run('rainlab/user/us...')
#8 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#9 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('run', Array)
#10 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Backend\Classes\BackendController), 'run')
#11 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(169): Illuminate\Routing\Route->runController()
#12 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Route->run()
#13 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#14 /home/deltarv/public_html/modules/backend/classes/BackendController.php(68): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#15 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(131): Backend\Classes\BackendController->Backend\Classes\{closure}(Object(Illuminate\Http\Request), Object(Closure))
#16 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#17 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#18 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#19 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#20 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#21 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#22 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#23 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#24 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#25 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#26 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#27 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#28 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#29 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#30 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#31 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#32 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#33 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(660): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#34 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#35 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(601): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#36 /home/deltarv/public_html/vendor/october/rain/src/Router/CoreRouter.php(20): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#37 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): October\Rain\Router\CoreRouter->dispatch(Object(Illuminate\Http\Request))
#38 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#39 /home/deltarv/public_html/plugins/offline/speedy/classes/middleware/CDNMiddleware.php(40): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#40 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): OFFLINE\Speedy\Classes\Middleware\CDNMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#41 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#42 /home/deltarv/public_html/plugins/offline/speedy/classes/middleware/Http2Middleware.php(38): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#43 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): OFFLINE\Speedy\Classes\Middleware\Http2Middleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#44 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#45 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#46 /home/deltarv/public_html/vendor/october/rain/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php(24): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): October\Rain\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#48 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#49 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#50 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#51 /home/deltarv/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#52 /home/deltarv/public_html/index.php(43): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
  • Сборка 458.

  • У меня естьнекоторые сторонние плагины и некоторые из моих собственных. Ни один из них не устарел.

  • Это единственные дистрибутивы, у которых возникают проблемы с фильтрацией полей списка. Мои другие дистрибутивы с аналогичными сторонними и пользовательскими плагинами работают нормально.

  • Я могу создавать и обновлять записи и сортировать записи в виде списка.

1 Ответ

1 голос
/ 24 октября 2019

Эта ошибка связана с void datatype. Он был введен в PHP 7.1. Это вызывает ошибку в более низких версиях PHP.

https://wiki.php.net/rfc/void_return_type

для более низкой версии php это рассматривается как внешний тип. void не найден в типах данных по умолчанию, поэтому он становится Backend\Traits\void.

Так что он жаловался на это. после обновления PHP to 7.1 ошибка должна исчезнуть.

...