New answers tagged


Yes, definitely higher up. When you are already inside of a 404 subrequest it is too late. You could put the code in on404() of an HttpExceptionSubscriber, check the path and then replace the 404 with 410: $event->setException(new HttpException(410)); See


What Drupal considers the default front page is not /node, but /user/login, which redirects logged-in users to their account page. SiteInformationForm::validateForm() contains the following code. // Check for empty front page path. if ($form_state->isValueEmpty('site_frontpage')) { // Set to default "user/login". $form_state->...


You can't redirect with Post properties. You can only do a request, which you've done. The $response you've created in the controller will contain the results of your HTTP request to the remote service. You'll have to retrieve the the relevant data from that object, and do something with it. You are currently returning that from your function. $response is a ...


I solved the problem disabling the maintenance mode.

Top 50 recent answers are included