Problem/Motivation
Currently, there are two theme implementations defined in the graphql_theme() hook. They are not connected to any theme templates, which has caused fatal errors on some pages—e.g., /graphql-explorer and /graphql_voyager. I suspect there may be a correlation between core/contrib page theme suggestions and these two themes. These URLs likely attempt to render the page using the themes defined by the graphql_theme() hook, and since no templates are connected, a fatal error occurs.
The website encountered an unexpected error. Try again later.
Twig\Error\LoaderError: Template "modules/contrib/graphql/templates/page--graphql-explorer.html.twig" is not defined. in Twig\Loader\ChainLoader->getCacheKey() (line 55 of core/themes/olivero/templates/layout/html.html.twig).
Twig\Environment->getTemplateClass('modules/contrib/graphql/templates/page--graphql-explorer.html.twig', NULL) (Line: 204)
Drupal\Core\Template\TwigEnvironment->getTemplateClass('modules/contrib/graphql/templates/page--graphql-explorer.html.twig') (Line: 371)
Twig\Environment->load('modules/contrib/graphql/templates/page--graphql-explorer.html.twig') (Line: 33)
twig_render_template('modules/contrib/graphql/templates/page--graphql-explorer.html.twig', Array) (Line: 348)
Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 446)Proposed resolution
Since there doesn’t appear to be any usage of these theme implementations, I believe they should be removed.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | graphql_remove-graphql-theme-3538511-4.patch | 845 bytes | id.aleks |
Issue fork graphql-3538511
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
id.aleks commentedI’ve created a merge request that removes the graphql_theme() hook. I’m also including a patch for the 8.x-4.x-dev version. Please review.
Comment #4
id.aleks commentedFixed the patch file extension.
Comment #6
klausiFixed gitlab pipeline fails in #3538594: Fix Gitlab pipeline in 4.x, merged that into the MR.
Put it on the merge train, should be committed soon.
Comment #9
klausiMerged.
Comment #10
id.aleks commented@klausi Thanks!