/admin/content causes fatal error with Retrofit
This was reported via Slack.
Error: Call to a member function setArguments) on null in DrupaNviews Form\ViewsExposedForm-> buildForm() (line 82 of core/modules/views/src/Form/ViewsExposedForm.php).
I was getting a similar error in the Appearance tab. Fixed this by adding another case to ArrayAccessFormState.
public function offsetSet(mixed $offset, mixed $value): void
{
switch ($offset) {
...
case 'build_info':
$this->setBuildInfo($value);
break;
Thanks for reporting this @mariosm1 !! we can get that added
I'm surprised the existing methods didn't work, since the property name is the same internally still https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Core/Form/FormState.php?ref_type=heads#L987
It looks like FormState::set() adds the build_info to the $form_state->storage array, but FormBuilder::retrieveForm() grabs the build_info directly from $form_state->build_info and it was coming up as an empty array
Thanks @mariosm1, now that I'm back at a computer I will add that.
Merged and cut a release, thanks for digging in @mariosm1
@mglaman No problem!
Running Drupal 10.3.10 with retrofit 0.1.14 and seeing pretty much the same error at /admin/content
The website encountered an unexpected error. Try again later.
Error: Call to a member function getExposedInput() on null in Drupal\views\Form\ViewsExposedForm->buildForm() (line 78 of core/modules/views/src/Form/ViewsExposedForm.php).
call_user_func_array() (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 284)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 65)
Retrofit\Drupal\Form\FormBuilder->buildForm() (Line: 134)
Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase->renderExposedForm() (Line: 1298)
Drupal\views\ViewExecutable->build() (Line: 393)
Drupal\views\Plugin\views\display\PathPluginBase->execute() (Line: 198)
Drupal\views\Plugin\views\display\Page->execute() (Line: 1690)
Drupal\views\ViewExecutable->executeDisplay() (Line: 81)
Drupal\views\Element\View::preRenderViewElement()
call_user_func_array() (Line: 113)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 870)
Drupal\Core\Render\Renderer->doCallback() (Line: 432)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 231)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Previously I had retrofit 0.1.10 working well with Drupal 10.2.5. I tried downgrading from 0.1.14 to 0.1.10 on Drupal 10.3.10 and that at least cleared the above error
Came here from your video, and after implementation i get the same error on /admin/content/ and /admin/reports/dblog. I guess 0.1.14's build_info switch case is insuffictient. I will try and see if i can fix this and create a PR.
case 'build_info':
$this->setBuildInfo($value);
break;
As @emasters suggested, downgrading to 0.1.10 got it up and running again