0

After changing webiste hosting (Drupal 8) I got this very un-intuitive error message:

The website encountered an unexpected error. Please try again later.

Symfony\Component\HttpKernel\Exception\NotFoundHttpException: in Drupal\Core\PathProcessor\PathProcessorFront->processInbound() (line 43 of core/lib/Drupal/Core/PathProcessor/PathProcessorFront.php).

Drupal\Core\PathProcessor\PathProcessorManager->processInbound('/', Object) (Line: 157)
Drupal\Core\Routing\RouteProvider->getRouteCollectionForRequest(Object) (Line: 141)
Symfony\Cmf\Component\Routing\NestedMatcher\NestedMatcher->matchRequest(Object) (Line: 258)
Symfony\Cmf\Component\Routing\DynamicRouter->matchRequest(Object) (Line: 185)
Symfony\Cmf\Component\Routing\ChainRouter->doMatch('/', Object) (Line: 155)
Symfony\Cmf\Component\Routing\ChainRouter->matchRequest(Object) (Line: 84)
Drupal\Core\Routing\AccessAwareRouter->matchRequest(Object) (Line: 154)
Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object, 'kernel.request', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.request', Object) (Line: 120)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 628)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

The files are all the same, other files on ftp/website (besides Drupal) are accessible and works fine.

I've cleared cache via Admin Panel before moving anything.

I've also tried remove it manually:

TRUNCATE cache_config;
TRUNCATE cache_container;
TRUNCATE cache_data;
TRUNCATE cache_default;
TRUNCATE cache_discovery;
TRUNCATE cache_dynamic_page_cache;
TRUNCATE cache_entity;
TRUNCATE cache_menu;
TRUNCATE cache_render;
TRUNCATE cache_toolbar;

but I guess it's not the point.

The previous website was working on http://someurl1.com/site/ (sub-domain) and new one is under http://someurl.com/ (top domain). But even moving everthing on new hosting to /site/ doesn't change a thing.

When I changed database connection settings in settings.php to something wrong intentionally I get:

PDOException: SQLSTATE[HY000] [1044] Access denied for user...

So I guess it's not the database connection problem either.

Using http://.../core/rebuild.php also didn't help.

  • Have you checked the apache logs (or what webserver you use) ? Is mod_rewrite enabled ? – rémy Sep 21 '16 at 7:50
  • 1
    This NotFoundHttpException error happened to me after TRUNCATEing all cache* db tables. drush cr was no help. It went away when copying the full database with all data. – Gogowitsch Nov 24 '17 at 21:18
  • I have the same problem with drupal 8 installations. when I add /install.php to my url i got the drupal installation page and works good to me. localhost/mydrupal8website/install.php – Wasim Khan Apr 8 '18 at 14:37
  • Did you check all paths and names and host patterns in settings.php? – Rainer Feike Sep 11 at 9:09
0

Check database connection through drush sql-cli and show tables, I got the same error because of an empty database once.

If the data is of no importance, you can run drush site-install to re-install Drupal from scratch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.