Having a backend filter list issue

190 views Asked by At

For two of my distributions I am having an unique issue when filtering any backend model list. They have different plugins. The most common thing between both of them is they have custom plugins that I first created with the Builder plugin. They are also hosted on different linux servers.

enter image description here

enter image description here

The error is:

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

Here is the log trace:

#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))
  • Build is 458.

  • I have some third party plugins and some of my own created ones. None of which are out of date.

  • These are the only distributions that are having problems filtering list fields. My other distributions with similar third party and custom plugins work fine.

  • I can create and update records and sort through the records in the list view.

1

There are 1 answers

2
Hardik Satasiya On BEST ANSWER

This error is related to void datatype. It was introduced in PHP 7.1. It is causing error issue in lower PHP versions.

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

for lower version of php it is treated like external type. void is not found in default data types so it becomes Backend\Traits\void.

So it was complaining about that. once you update PHP to 7.1 error should go away.