- πΊπΈUnited States smustgrave
This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β as a guide.
This will require a test case.
- Status changed to Needs review
over 1 year ago 3:39pm 13 March 2023 - π¦πΉAustria klausi π¦πΉ Vienna
Unit test case attached without the fix to demonstrate the fail. Bug also exists in Drupal 10.
- Status changed to Needs work
over 1 year ago 3:44pm 13 March 2023 - πΊπΈUnited States smustgrave
Reading the issue summary
Figure out what is causing the error and resolve it.
Was it determined what was causing it? What was causing the empty request?
- @klausi opened merge request.
- Status changed to Needs review
over 1 year ago 4:15pm 13 March 2023 - π¦πΉAustria klausi π¦πΉ Vienna
Ah sorry, did not fully update the issue summary. Done now.
As shown in the stacktrace the error is caused when a Url object is unserialized and calls down to RequestContext. That can happen in a middleware where no current request was pushed onto the RequestStack yet.
- Issue was unassigned.
- Status changed to RTBC
over 1 year ago 9:48pm 13 March 2023 - πΊπΈUnited States smustgrave
Thanks. Removing the assigned person as it's been 7 years.
#16 does show the failure so will move this along to see what the committers say.
- Status changed to Needs work
over 1 year ago 9:04am 31 March 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Left a comment on the MR
Can we reproduce this without a unit test, the test is slightly contrived - in reality most Drupal code will be running in the context of a request. It's the first thing we create in index.php.
- π©πͺGermany jan kellermann
We have this problem when page_cache is deserializing a form because somewhere on the way the RequestStack is empty.
We use open social and memcache, so several parts of code can cause this bug. The form is the enroll-action-form embedded in a block.The MR 3646 mitigated this problem.
TypeError: Drupal\Core\Routing\RequestContext::fromRequest(): Argument #1 ($request) must be of type Symfony\Component\HttpFoundation\Request, null given, [...] Drupal\Core\Routing\RequestContext->fromRequest() (Line: 28) Drupal\Core\Routing\RequestContext->fromRequestStack() call_user_func_array() (Line: 276) Drupal\Component\DependencyInjection\Container->createService() (Line: 177) Drupal\Component\DependencyInjection\Container->get() (Line: 434) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 273) Drupal\Component\DependencyInjection\Container->createService() (Line: 449) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 237) Drupal\Component\DependencyInjection\Container->createService() (Line: 177) Drupal\Component\DependencyInjection\Container->get() (Line: 434) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 237) Drupal\Component\DependencyInjection\Container->createService() (Line: 177) Drupal\Component\DependencyInjection\Container->get() (Line: 434) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 237) Drupal\Component\DependencyInjection\Container->createService() (Line: 177) Drupal\Component\DependencyInjection\Container->get() (Line: 89) Drupal\Core\Form\FormBase->__wakeup() Memcached->getMulti() (Line: 71) Drupal\memcache\Driver\MemcachedDriver->getMulti() (Line: 144) Drupal\memcache\MemcacheBackend->getMultiple() (Line: 136) Drupal\memcache\MemcacheBackend->get() (Line: 306) Drupal\page_cache\StackMiddleware\PageCache->get() (Line: 124) Drupal\page_cache\StackMiddleware\PageCache->lookup() (Line: 82) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23) Stack\StackedHttpKernel->handle() (Line: 718) Drupal\Core\DrupalKernel->handle() (Line: 19)