- 🇺🇸United States bnjmnm Ann Arbor, MI
Unable to reproduce.
If the person reporting this is still experiencing the issue 6 years later by all means reopen with additional information about the environment this issue is happening in.
I have the following issue when trying to use a custom page template for a specific route. My custom template is only used for a limited time (after cache clear). This time varies from 5 minutes to half an hour. After that, the regular page template is used.
Test code:
/**
* Implements hook_theme_suggestions_hook_alter().
*/
function THEMENAME_suggestions_page_alter(&$suggestions, $variables) {
$route_name = \Drupal::routeMatch()->getRouteName();
if ($route_name == 'my.route.name') {
$suggestions[] = 'page__customtemplate';
}
}
My template name:
page--customtemplate.html.twig
Any ideas on why Drupal handles this only for a short period of time?
Closed: cannot reproduce
11.0 🔥
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Unable to reproduce.
If the person reporting this is still experiencing the issue 6 years later by all means reopen with additional information about the environment this issue is happening in.