Redirect to current subject to site cache

Created on 29 November 2019, about 5 years ago
Updated 8 February 2024, 11 months ago

Drupal 8.7.10 with PHP 7.3.11
Using the option on the settings page does not track the user moving through the site.
The current page seems to reset to the URI of the user when the cache is cleared. Following either menu bar links or book navigation links to other pages in the site does not change the "Current" page passed to the login page. The "?current=" link points to the URI at the time of cache rebuild.

Oddly if I open an Incognito window the current page set at cache rebuild time is carried over into the new Incognito browser window

Turning the caching on or off in the Performance config page does not seem to make any difference

Best to you

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States adam-bauer

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States astringer

    The merge request from #13 failed for me. 9.5.3 and 8.x-2.x beta 6(Applied, but I got this WSOD.)

    I didn't have time to test it with another theme.

    The website encountered an unexpected error. Please try again later.
    TypeError: Drupal\bootstrap\Plugin\PrerenderManager::preRender(): Argument #1 ($element) must be of type array, null given in Drupal\bootstrap\Plugin\PrerenderManager::preRender() (line 36 of themes/contrib/bootstrap/src/Plugin/PrerenderManager.php).
    Drupal\bootstrap\Plugin\PrerenderManager::preRender(NULL)
    call_user_func_array(Array, Array) (Line: 101)
    Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725 β†’ ', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 788)
    Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 374)
    Drupal\Core\Render\Renderer->doRender(NULL) (Line: 446)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 94)
    template_preprocess_toolbar(Array, 'toolbar', Array)
    call_user_func_array('template_preprocess_toolbar', Array) (Line: 287)
    Drupal\Core\Theme\ThemeManager->render('toolbar', Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array) (Line: 446)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 479)
    Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 83)
    __TwigTemplate_474fe8af4d3a856c59ebc5f7c9fa5132->doDisplay(Array, Array) (Line: 405)
    Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
    Twig\Template->display(Array) (Line: 390)
    Twig\Template->render(Array) (Line: 55)
    twig_render_template('themes/custom/itp_bs/templates/system/html.html.twig', Array) (Line: 384)
    Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 162)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 163)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
    call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
    Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 707)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

  • First commit to issue fork.
  • πŸ‡«πŸ‡·France prudloff Lille

    Disabling cache completely seems like overkill, we only need to make the cache vary based on path.

Production build 0.71.5 2024