It is not possible to log non-translatable messages anymore

Created on 14 March 2015, almost 10 years ago
Updated 2 March 2023, almost 2 years ago

Problem/Motivation

LogMessageParserInterface::parseMessagePlaceholders() always returns an array. Then Dblog does this:

    $message_placeholders = $this->parser->parseMessagePlaceholders($message, $context);
    $this->database
      ->insert('watchdog')
      ->fields(array(
        // ...
        'variables' => serialize($message_placeholders),
        // ...
      ))
      ->execute();

The display logic in DBLog as correctly ported from Drupal 7 skips translation if N; (serialized NULL) is encountered. That is not a possible value anymore.

Proposed resolution

Discuss.

Remaining tasks

Discuss.

User interface changes

None.

API changes

Possible.

πŸ› Bug report
Status

Closed: outdated

Version

9.5

Component
Database LoggingΒ  β†’

Last updated 3 months ago

  • Maintained by
  • πŸ‡¦πŸ‡·Argentina @dagmar
Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024