Closed (cannot reproduce)
Project:
Admin Toolbar
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2020 at 06:54 UTC
Updated:
5 Oct 2023 at 20:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alexverb commentedPatch provided
Comment #3
alexverb commentedComment #4
alexverb commentedRerolled patch for 8.x-2.x-dev
Comment #5
adriancid@alexverb I'm not sure we are you having this issue as we are redirecting inside the site and not to an external url.
Comment #6
romainj commentedComment #7
noah commentedThis issue occurs consistently for us on sites that exist behind a proxy—I'm not a network guy, so I don't understand all the details, but I'm pretty sure it's either trying to redirect from the unproxied path to the proxied one or vice versa, and that's causing this error.
Comment #8
adriancid@noah and the patch fix the problem for you?
Comment #9
noah commentedWith the changes from the patch in place, flushing the cache from the toolbar works. Running cron, however, results in this error:
LogicException: The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\Core\Routing\TrustedRedirectResponse. in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (line 154 of /site/root/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php).I had applied the changes from the patch manually because it doesn't apply cleanly to 8.x-2.4, and also there appears to be a typo at line 10 of the patch—I think that:
+use Drupal\Core\Routing\TrustedTrustedRedirectResponse;should be:
+use Drupal\Core\Routing\TrustedRedirectResponse;Comment #10
adriancid@noah can you provide a new patch?
Comment #11
noah commentedI can update the existing patch to fix the typo and fuzziness, if that helps, but I spent a bit of time looking at the "LogicException" error and wasn't able to get anywhere—someone with a better understanding of how caching works will have to sort that out.
Comment #12
noah commentedPatch attached—this should apply cleanly to 8.x-2.x, and fixes the typo in the previous patch. It does not fix the new "LogicException" error when running cron from the toolbar.
I can't create an inderdiff to create for some reason—it keeps failing on the line from the previous patch with the typo.
Comment #13
romainj commented@noah. Do you still get the issue?
Comment #14
noah commentedWe made some changes to how the proxy was configured, and the problem is no longer occurring for us (even without the patch). I'm not sure if that's evidence that the problem was always due to proxy misconfiguration or not. Sorry I can't offer more clarity, but I can't reproduce the problem now to try to determine if the patch is required.
Comment #15
romainj commentedComment #16
runofthemill commentedI was having this issue, and patch in #12 fixed it up without any changes to reverse proxy.