Problem/Motivation

The status page provided by the module assumes some redis memory info is present, which is not the case on an AWS serverless valkey. It ends up trying to Html:escape(NULL); which makes the page error out.

Steps to reproduce

Install the module, configure Drupal to use a (serveless) valkey cache, navigate to `/admin/reports/redis`.

The website encountered an unexpected error. Try again later.

TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in /srv/www/html/core/lib/Drupal/Component/Render/FormattableMarkup.php on line 238 in Drupal\Component\Utility\Html::escape() (line 433 of core/lib/Drupal/Component/Utility/Html.php).

Drupal\Component\Render\FormattableMarkup::placeholderEscape() (Line: 187)
Drupal\Component\Render\FormattableMarkup::placeholderFormat() (Line: 192)
Drupal\Core\StringTranslation\TranslatableMarkup->render() (Line: 235)
Drupal\Core\StringTranslation\TranslatableMarkup->__toString() (Line: 446)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 98)
__TwigTemplate_8f64ec509fdf2623c4356a3d9364c1a6->doDisplay() (Line: 411)
Twig\Template->yield() (Line: 394)
Twig\Template->render() (Line: 51)
Twig\TemplateWrapper->render() (Line: 35)
Drupal\Core\Template\TwigThemeEngine->renderTemplate() (Line: 428)
Drupal\Core\Theme\ThemeManager->render() (Line: 504)
Drupal\Core\Render\Renderer->doRender() (Line: 517)
Drupal\Core\Render\Renderer->doRender() (Line: 230)
Drupal\Core\Render\Renderer->render() (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->{closure:Drupal\Core\Render\MainContent\HtmlRenderer::prepare():235}() (Line: 638)
Drupal\Core\Render\Renderer::{closure:Drupal\Core\Render\Renderer::executeInRenderContext():638}()
Fiber->start() (Line: 639)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 235)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 131)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 69)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() (Line: 254)
Symfony\Component\EventDispatcher\EventDispatcher::{closure:Symfony\Component\EventDispatcher\EventDispatcher::optimizeListeners():249}() (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: 30)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 118)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 92)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 61)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 71)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 753)
Drupal\Core\DrupalKernel->handle() (Line: 34)
Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (Line: 32)
require('/srv/www/vendor/autoload_runtime.php') (Line: 22)
require_once('/srv/www/html/autoload_runtime.php') (Line: 13)

Proposed resolution

Ensure the theme layer gets a string value instead of a NULL.

Remaining tasks

Patch it.

User interface changes

Display something instead of nothing.

Issue fork redis-3620580

Command icon 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

cafuego created an issue. See original summary.

cafuego’s picture

Status: Active » Needs review

The MR fixes the crash, but I'm not sure if it would be better to default the various memory/info bits to '' and/or 0 instead of NULL in the various Client::info() methods.