Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirects in maintenace mode cause fatal errors #28

Open
Ambient-Impact opened this issue Jul 9, 2023 · 0 comments
Open

Redirects in maintenace mode cause fatal errors #28

Ambient-Impact opened this issue Jul 9, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Ambient-Impact
Copy link
Member

This is unlikely to be due to moving the DigitalOcean site from preview.omnipedia.app to omnipedia.app because I can replicate this locally on my dev copy of the site.

There seem to be a number of Drupal core issues kind of related but not exactly matching our problem:

Stack trace:

User error: Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it. in Drupal\Core\EventSubscriber\RedirectResponseSubscriber->checkRedirectUrl() (line 89 of /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php)

#0 /var/www/html/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real(256, 'Redirects to ex...', '/var/www/html/w...', 89)

#1 [internal function]: _drupal_error_handler(256, 'Redirects to ex...', '/var/www/html/w...', 89)

#2 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php(89): trigger_error('Redirects to ex...', 256)

#3 [internal function]: Drupal\Core\EventSubscriber\RedirectResponseSubscriber->checkRedirectUrl(Object(Symfony\Component\HttpKernel\Event\ResponseEvent), 'kernel.response', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))

#4 /var/www/html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ResponseEvent), 'kernel.response', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))

#5 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(199): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ResponseEvent), 'kernel.response')

#6 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(250): Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object(Symfony\Component\HttpFoundation\RedirectResponse), Object(Symfony\Component\HttpFoundation\Request), 1)

#7 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(89): Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object(Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException), Object(Symfony\Component\HttpFoundation\Request), 1)

#8 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

#9 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

#10 /var/www/html/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

#11 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

#12 /var/www/html/web/modules/contrib/trusted_reverse_proxy/src/StackMiddleware/TrustedReverseProxyMiddleware.php(64): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

#13 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\trusted_reverse_proxy\StackMiddleware\TrustedReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

#14 /var/www/html/web/modules/contrib/remove_http_headers/src/StackMiddleware/RemoveHttpHeadersMiddleware.php(49): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

#15 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

#16 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

#17 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))

#18 @main.

@Ambient-Impact Ambient-Impact added the bug Something isn't working label Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

1 participant