Skip to content

Instantly share code, notes, and snippets.

@AurelienLavorel
Last active September 19, 2019 21:47
Show Gist options
  • Select an option

  • Save AurelienLavorel/bc912f82d7a9efcfde30a367472589d5 to your computer and use it in GitHub Desktop.

Select an option

Save AurelienLavorel/bc912f82d7a9efcfde30a367472589d5 to your computer and use it in GitHub Desktop.
fix 404 error on homepage
Index: vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php (date 1568877775000)
+++ src/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php (date 1568877794582)
@@ -69,7 +69,7 @@
return $proceed($request);
}
$result = $this->kernel->load();
- if ($result === false) {
+ if ($result === false || ($result instanceof ResponseHttp && $result->getStatusCode() == 404)) {
$result = $proceed($request);
if ($result instanceof ResponseHttp) {
$this->addDebugHeaders($result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment