AJAX error : Call to a member function get() on null

Created on 10 February 2020, almost 5 years ago
Updated 25 March 2024, 8 months ago

I just installed this module and tried using it on a existing view. (The site is Drupal 8.8.1, the server is Apache on a Windows machine, with PHP 7.2. I also tested it on a Debian server (same site), with the same result.)

It appears that the mere fact of having this module installed (even if it is not actively used in the view) causes an error when trying to rearrange fields in the view. As a result it's impossible de validate the change (the modal dialog box won't close, because of the error).

I tried with both the stable and dev version of the module, with the same result.

Uninstalling the module makes the problem go away.

The error displayed in the Firefox console is not very specific:

AjaxError: 
Une erreur HTTP AJAX s'est produite.
Code de statut HTTP : 200
Informations de dΓ©bogage ci-dessous.
Chemin : /mysite/fr/admin/structure/views/ajax/rearrange/agenda/page_1/field
StatusText: OK
ResponseText :

In admin/reports/dblog/, I find the following error:

Error: Call to a member function get() on null in Drupal\views_ui\Form\Ajax\Rearrange->submitForm() (W:\htdocs\mysite\core\modules\views_ui\src\Form\Ajax\Rearrange.php line 157)
#0 [internal function]: Drupal\views_ui\Form\Ajax\Rearrange->submitForm(Array, Object(Drupal\Core\Form\FormState))
#1 W:\htdocs\mysite\core\modules\views_ui\src\ViewUI.php(259): call_user_func_array(Array, Array)
#2 [internal function]: Drupal\views_ui\ViewUI->standardSubmit(Array, Object(Drupal\Core\Form\FormState))
#3 W:\htdocs\mysite\core\lib\Drupal\Core\Form\FormSubmitter.php(112): call_user_func_array(Array, Array)
#4 W:\htdocs\mysite\core\lib\Drupal\Core\Form\FormSubmitter.php(52): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState))
#5 W:\htdocs\mysite\core\lib\Drupal\Core\Form\FormBuilder.php(591): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState))
#6 W:\htdocs\mysite\core\lib\Drupal\Core\Form\FormBuilder.php(320): Drupal\Core\Form\FormBuilder->processForm('views_ui_rearra...', Array, Object(Drupal\Core\Form\FormState))
#7 W:\htdocs\mysite\core\modules\views_ui\src\Form\Ajax\ViewsFormBase.php(215): Drupal\Core\Form\FormBuilder->buildForm('Drupal\\views_ui...', Object(Drupal\Core\Form\FormState))
#8 W:\htdocs\mysite\core\lib\Drupal\Core\Render\Renderer.php(573): Drupal\views_ui\Form\Ajax\ViewsFormBase->Drupal\views_ui\Form\Ajax\{closure}()
#9 W:\htdocs\mysite\core\modules\views_ui\src\Form\Ajax\ViewsFormBase.php(217): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#10 W:\htdocs\mysite\core\modules\views_ui\src\Form\Ajax\ViewsFormBase.php(126): Drupal\views_ui\Form\Ajax\ViewsFormBase->ajaxFormWrapper('Drupal\\views_ui...', Object(Drupal\Core\Form\FormState))
#11 W:\htdocs\mysite\core\modules\views_ui\src\Form\Ajax\Rearrange.php(38): Drupal\views_ui\Form\Ajax\ViewsFormBase->getForm(Object(Drupal\views_ui\ViewUI), 'page_1', 'ajax')
#12 [internal function]: Drupal\views_ui\Form\Ajax\Rearrange->getForm(Object(Drupal\views_ui\ViewUI), 'page_1', 'ajax', 'field')
#13 W:\htdocs\mysite\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#14 W:\htdocs\mysite\core\lib\Drupal\Core\Render\Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 W:\htdocs\mysite\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#16 W:\htdocs\mysite\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#17 W:\htdocs\mysite\vendor\symfony\http-kernel\HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 W:\htdocs\mysite\vendor\symfony\http-kernel\HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#19 W:\htdocs\mysite\core\lib\Drupal\Core\StackMiddleware\Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 W:\htdocs\mysite\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 W:\htdocs\mysite\core\modules\page_cache\src\StackMiddleware\PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 W:\htdocs\mysite\core\modules\page_cache\src\StackMiddleware\PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 W:\htdocs\mysite\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 W:\htdocs\mysite\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 W:\htdocs\mysite\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 W:\htdocs\mysite\core\lib\Drupal\Core\DrupalKernel.php(694): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFou
πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland s427

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024