Schema errors for time_diff.description (missing schema)

Created on 18 March 2024, 9 months ago

Problem/Motivation

Drupal\Tests\commerce_funds\Functional\PaymentWorkflowTest::testPaymentWorkflow
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for views.view.commerce_funds_withdrawal_requests with the following errors: views.view.commerce_funds_withdrawal_requests:display.default.display_options.fields.created.settings.time_diff.description missing schema

It is not the only schema issue. This was introduced with timediff in core. Currently, these configs have been removed from the views to bypass failing tests.

This also triggers a deprecation notice:
72x: Using the 'timestamp' formatter plugin without the 'tooltip' and 'time_diff' settings is deprecated in drupal:10.1.0 and is required in drupal:11.0.0. See https://www.drupal.org/node/2993639

Steps to reproduce

Export comme_funds views and run tests.

Proposed resolution

@see https://www.drupal.org/project/drupal/issues/3400522 🐛 TimestampFormatter / time_diff missing config schema Needs work

📌 Task
Status

Active

Version

2.1

Component

Code

Created by

🇭🇷Croatia Aporie

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Aporie
  • 🇩🇪Germany Anybody Porta Westfalica

    Maybe you want to run

    /**
     * Update timestamp formatter settings for views.
     */
    function views_post_update_timestamp_formatter(?array &$sandbox = NULL): void {
      /** @var \Drupal\views\ViewsConfigUpdater $view_config_updater */
      $view_config_updater = \Drupal::classResolver(ViewsConfigUpdater::class);
      \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'view', function (ViewEntityInterface $view) use ($view_config_updater): bool {
        return $view_config_updater->needsTimestampFormatterTimeDiffUpdate($view);
      });
    }
    

    in dev

    and re-export the views afterwards?

    ddev drush ev 'require("core/modules/views/views.post_update.php"); $array=[]; views_post_update_timestamp_formatter($array);'
    ddev drush cex --diff

  • 🇭🇷Croatia Aporie

    Hi Anybody,

    Thanks for the contrib. I was actually working on a new release for CF.

    I just re-saved the view and re-exported the config. Did the trick.

    Closing this ticket.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024