The new notification message dismiss feature is throwing the following exception when running functional tests.

Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for notification_message.type.global with the following errors: notification_message.type.global:notification_dismiss variable type is NULL but applied schema class is Drupal\Core\Config\Schema\Mapping

/web/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php:94

I think we just need to add some config to the notification_message.type.global.yml file:

notification_dismiss:
    show: true
    button_text: Dismiss
CommentFileSizeAuthor
notification_message-schema.patch503 bytesdatvance

Comments

datvance created an issue. See original summary.

datvance’s picture

It would probably also be nice to add an update hook to update any existing schemas. Something like:

function notification_message_update_NNNN(&$sandbox)
{
  $existing_types = //code here to get existing types
  $config_factory = \Drupal::configFactory();
  foreach($existing_types as $notification_type)
  {
    $config = $config_factory->getEditable('notification_message.type.' . $notification_type);
    $config->set('notification_dismiss', ['show' => true, 'button_text' => 'Dismiss'])->save();
  }
}

  • droath committed e0a4bc8 on 8.x-1.x
    Issue #3292348 by datvance, droath: Schema errors for...
droath’s picture

@datvance Thanks for the feedback, this has been patched and will be pushed in the next release.

droath’s picture

Status: Active » Fixed
droath’s picture

Status: Fixed » Closed (fixed)