I downloaded the module via composer, reverted the core.patch and enabled it now i become this

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

AssertionError: \Drupal::service('cache_contexts_manager')->assertValidTokens($cache_contexts) in Drupal\Component\Assertion\Handle::Drupal\Component\Assertion\{closure}() (line 37 of core/lib/Drupal/Core/Cache/Cache.php).
assert('\Drupal::service('cache_contexts_manager')->assertValidTokens($cache_contexts)')
Drupal\Core\Cache\Cache::mergeContexts(Array, Array)
Drupal\Core\Cache\CacheableMetadata->merge(Object)
Drupal\Core\Render\BubbleableMetadata->merge(Object)
Drupal\Core\Render\RenderContext->update(Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1)
__TwigTemplate_bef227b32b6db7096512f56688b129eb999f3703f9ae11a4b8660a9bb8934c58->doDisplay(Array, Array)
Twig_Template->displayWithErrorHandling(Array, Array)
Twig_Template->display(Array)
Twig_Template->render(Array)
twig_render_template('core/themes/classy/templates/layout/html.html.twig', Array)
Drupal\Core\Theme\ThemeManager->render('html', Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)

Comments

Insasse created an issue. See original summary.

didebru’s picture

Issue summary: View changes
almaudoh’s picture

This will happen if you have a module that doesn't specify valid cache contexts. What other modules do you have installed?

wim leers’s picture

Title: AssertionError: \Drupal::service('cache_contexts_manager')->assertValidTokens($cache_contexts) » RefreshLess does not declare a dependency on Drupal 8.1, yet uses the session.exists cache context available only there
Issue tags: -Assertion Failure

Like @almaudoh said, this is not a bug in Refreshless, and will occur even without Refreshless.

Oh, wait… Refreshless relies on the session.exists cache context, which was added to Drupal 8.1 at #2671988: Add SessionExistsCacheContext ('session.exists'). Which means this module currently only works in Drupal 8.1.

I'll either get rid of this cache context, or require Drupal 8.1 to be used.

heddn’s picture

Seeing as 8.0's shelf-life is short, maybe focusing on 8.1 is enough for now?

wim leers’s picture

Title: RefreshLess does not declare a dependency on Drupal 8.1, yet uses the session.exists cache context available only there » RefreshLess should declare a dependency on Drupal 8.1

That's exactly what I was hoping to do.

So let's go with that. Thanks!

wim leers’s picture

Priority: Normal » Critical

This will cause lots of frustrations if we don't do this.

wim leers’s picture

Status: Active » Needs review
StatusFileSize
new410 bytes

  • Wim Leers committed bef2b72 on 8.x-1.x
    Issue #2693569 by Wim Leers: RefreshLess should declare a dependency on...
wim leers’s picture

Status: Needs review » Fixed
heddn’s picture

Is there a composer.json too?

wim leers’s picture

There is not :) That would be a nice issue actually, to add that. If you file it, I'd be happy to commit it :)

heddn’s picture

wim leers’s picture

StatusFileSize
new2.64 KB

For those on Drupal 8.0, here's a patch that makes RefreshLess compatible.

wim leers’s picture

StatusFileSize
new3.04 KB

And now with the 8.1 requirement removed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.