dblog_update_8600() breaks views.view.watchdog config entity, leading to PHP warning on admin/reports/dblog and configuration import errors

Created on 7 September 2018, about 6 years ago
Updated 19 April 2024, 7 months ago

Problem/Motivation

dblog_update_8600() only runs properly on sites where English is the default language.

Where English is not the default language, it doesn't update the view properly. You can get either of these on the admin/reports/dblog.
Illegal string offset 'value' in Drupal\views\Plugin\views\area\Text
Placeholders must have a trailing [] if they are to be expanded with an array of values. in Drupal\Core\Database\Connection->expandArguments()

Steps to reproduce

  1. Install Drupal 8.5.5 in a non-English language
  2. Update to 8.6.0

Or modify config (perhaps when trying to fix this)

The only way for things to be broken is if the content key were changed and the id/plugin_id didn't, or vice versa.
In either the old or new set of config, nothing would be broken.

From #122

      empty:
        area:
          id: area
          table: views
          field: area
          relationship: none
          group_type: group
          admin_label: ''
          empty: true
          tokenize: false
          content: 'Nessun messaggio di log disponibile.'
          plugin_id: text

Proposed resolution

This can be repaired from the UI. It may be easier to do if one has the configuration export of views.view.watchdog.yml from before the upgrade. The following uses the default view from a standard install of 8.5.5 in Italian.

1. Export view.view.watchdog.yml.
2. Find the empty section for the No results behavior. In the default config, in 8.5.5 it starts at line 656.

      empty:
        area:
          id: area
          table: views
          field: area
          relationship: none
          group_type: group
          admin_label: ''
          empty: true
          tokenize: false
          content:
            value: 'Nessun messaggio di log disponibile.'
            format: basic_html
          plugin_id: text

4. Delete the entire section, include the 'empty:'.
5. Import the config
6. Now add back the empty section, with some modifications. These are 'id', 'field', 'admin_label', 'content' and 'plugin_id'. If you have not customized this part of the view then use the following. If it was customized, then changing these fields should enable you to use the UI to make further changes.

      empty:
        area:
          id: area_text_custom
          table: views
          field: area_text_custom
          relationship: none
          group_type: group
          admin_label: 'Nessun messaggio di log disponibile.'
          empty: true
          tokenize: false
          content: 'Nessun messaggio di log disponibile.'
          plugin_id: text_custom

7. Import the config.
8. Do not remove and re-add this plugin. If you do there will be errors in the log. You can follow these steps again.

Remaining tasks

Decide to patch or not.

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: outdated

Version

9.5

Component
Database LoggingΒ  β†’

Last updated about 2 months ago

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

πŸ‡©πŸ‡ͺGermany quixxel

Live updates comments and jobs are added and updated live.
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