Problem/Motivation

A followup to #3473594: Improve the tour block in the context of the navigation module. In the latest commits before the issue had to go in somehow the styling was dropped. The icon is missing and the menu item for the tour and no tour navigation block look like actual buttons instead of being in line with the rest of the navigation blocks. plus the the dividing line between navigation blocks is also missing. (i've moved the block in the navigation layout above the user block)

no tour
footer region in the navigation sidebar with a no tour button right above the help and the user name menu items

tour
footer region in the navigation sidebar with a tour button right above the help and the user name menu items

Steps to reproduce

Proposed resolution

Readd the styling for the tour navigation block

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
no_tour.jpg10 KBrkoller
tour.jpg10.48 KBrkoller

Comments

rkoller created an issue. See original summary.

smustgrave’s picture

Status: Active » Postponed (maintainer needs more info)

Would do a cache clear or re-install navigation. Rendering fine for me but you may have some old config saved in navigation .

rkoller’s picture

i always do a drush cr when i checked out a branch and pulled the latest changes in git. did that several times. i tried to remove the navigation block that turned up a WSOD. i then just did a drush pmu tour went in addition to that into the navigation layout page and removed the now idle navigation block that was associated with tour. after that i'Ve installed the tour module again. but then ran into:

The website encountered an unexpected error. Try again later.

Twig\Error\LoaderError: Template "@navigation/toolbar-button.html.twig" is not defined in "modules/contrib/tour/templates/navigation-tour.html.twig" at line 27. in Twig\Loader\ChainLoader->getCacheKey() (line 111 of /var/www/html/vendor/twig/twig/src/Loader/ChainLoader.php).
Twig\Environment->getTemplateClass() (Line: 204)
Drupal\Core\Template\TwigEnvironment->getTemplateClass() (Line: 303)
Twig\Template->loadTemplate() (Line: 75)
__TwigTemplate_2f96483d69231434c998a1779b4f77ab->block_value() (Line: 437)
Twig\Template->yieldBlock() (Line: 48)
__TwigTemplate_2f96483d69231434c998a1779b4f77ab->doDisplay() (Line: 393)
Twig\Template->yield() (Line: 349)
Twig\Template->display() (Line: 364)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 459)
Drupal\Core\Render\Renderer->doRender() (Line: 203)
Drupal\Core\Render\Renderer->render() (Line: 476)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 86)
__TwigTemplate_639826cc7733d6cbac5dd6de5dbe0445->block_content() (Line: 437)
Twig\Template->yieldBlock() (Line: 69)
__TwigTemplate_639826cc7733d6cbac5dd6de5dbe0445->doDisplay() (Line: 393)
Twig\Template->yield() (Line: 349)
Twig\Template->display() (Line: 364)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 459)
Drupal\Core\Render\Renderer->doRender() (Line: 203)
Drupal\Core\Render\Renderer->render() (Line: 476)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 131)
__TwigTemplate_f568beb68e66f59451cf0e6d12db04f5->doDisplay() (Line: 393)
Twig\Template->yield() (Line: 349)
Twig\Template->display() (Line: 364)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 459)
Drupal\Core\Render\Renderer->doRender() (Line: 459)
Drupal\Core\Render\Renderer->doRender() (Line: 459)
Drupal\Core\Render\Renderer->doRender() (Line: 459)
Drupal\Core\Render\Renderer->doRender() (Line: 203)
Drupal\Core\Render\Renderer->render() (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 231)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() (Line: 246)
Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (Line: 206)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 188)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)
smustgrave’s picture

I think you need to uninstall navigation

rkoller’s picture

tried that now as well. ran drush pmu tour and drush pmu navigation, then ran a drush cr and then drush en navigation and after that drush en tour and another drush cr. , but i run into the same error still. :/ NO idea why.

rkoller’s picture

hm i've tried the following and simply removed the if else and only used the navigation_sdc case:

{% block value %}
    {% include 'navigation:toolbar-button' with {
      attributes: attributes,
      extra_classes: ['toolbar-button--collapsible'],
      icon: 'help',
      html_tag: tag,
      text: value,
    } only %}
{% endblock %}

with that the error is gone. could it be that it stumbles across the if statement? {% if navigation_sdc %}?

smustgrave’s picture

Core version?

rkoller’s picture

11.x

smustgrave’s picture

Would verify your 11.x has the SDC changes.

rkoller’s picture

in which issue those SDC changes went in for core? so i am able to see which files changed and check if those changes are also in place for me (which should be the case cuz i am on the latest version of 11.x)

rkoller’s picture

smustgrave’s picture

Yup

rkoller’s picture

yes changes are in place. svgs moved around and for example toolbar-button.component.yaml got added and toolbar-button.pcss.css changed and so on.

rkoller’s picture

you dont run into that WSOD on 11.x?

smustgrave’s picture

in tour.module can you change line 302 to

  if (str_starts_with(\Drupal::VERSION, '11') && (\Drupal::VERSION > '11.0.5' || str_contains(\Drupal::VERSION, '-dev'))) {
rkoller’s picture

ahhhhhh i guess i understand now. yep your suggested change fixed the WSOD. it is working now. that means the problem was i was using a none stable version of core, dev in my case. does that mean it would also need an entry for alpha and beta versions as well?

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Needs work

I don't mind including that change just means that there is a potential for someone to be on 11.x-dev branch and not have the SDC changes. Think that would be a small hole but probably best case we can cover.

rkoller’s picture

i agree, the odds someone on 11.x-dev but on a commit pre SDC who is using the tour module are rather low, very low.

  • smustgrave committed 4e149fb8 on 2.0.x
    Issue #3481864 by rkoller: Re-add the styling for the tour navigation...
smustgrave’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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