post-update aborted while running "system_post_update_timestamp_formatter"

Created on 26 July 2023, 11 months ago
Updated 9 September 2023, 9 months ago

Failing database updates after upgrading from 10.0.10 to 10.1.1

system_post_update_timestamp_formatter() will exit with an error in some circumstances, most commonly when the configuration references a plugin which is not available.

After upgrading from 10.0.10 to 10.1.1 try to run database updates

Profile used: minimal
drush updatedb -y error details
[notice] Update started: system_post_update_timestamp_formatter
[error] Update aborted by: system_post_update_timestamp_formatter
[error] Finished performing updates.

🐛 Bug report
Status

Postponed: needs info

Version

10.1

Component
System 

Last updated 2 days ago

No maintainer
Created by

🇮🇳India akarmalkar

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

Comments & Activities

  • Issue created by @akarmalkar
  • 🇺🇸United States cilefen

    This suggests that $entity_view_display->getComponents() is empty, or that the loop in system_post_update_timestamp_formatter was truncated by a continue statement.

    In other words, there are reasons this could fail. For example: Are there no entity view displays on the site?

  • 🇮🇳India JaydipJD surat

    Facing the same issue.

  • 🇮🇳India JaydipJD surat

    [error] SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'source_uuid' cannot be null: INSERT INTO "coh_usage" ("source_uuid", "source_type", "requires_uuid", "requires_type") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array
    > (
    > [:db_insert_placeholder_0] =>
    > [:db_insert_placeholder_1] => entity_view_display
    > [:db_insert_placeholder_2] => b23bb549-4b29-488f-9bf8-16a183cdac64
    > [:db_insert_placeholder_3] => node_type
    > )
    >
    > [error] Update failed: system_post_update_timestamp_formatter
    > [warning] Invalid placeholder (severity_level) with string: "%type: @message in %function (line %line of %file)." FormattableMarkup.php:245
    > [warning] Invalid placeholder (exception) with string: "%type: @message in %function (line %line of %file)." FormattableMarkup.php:245
    [error] Update aborted by: system_post_update_timestamp_formatter

  • 🇺🇸United States cbarto8

    I am seeing this issue also after upgrading from 9.5.10 to 10.1.2. Has anyone found a workaround?

  • 🇳🇿New Zealand xurizaemon Ōtepoti, Aotearoa 🏝

    Also seeing this on an Acquia CMS / Cohesion update to Drupal 10. I see that @JayDipJD's error references the same Cohesion (coh_usage) table I'm seeing the error on. Our Cohesion version is 8.x-7.2.2.

    I hooked up XDebug and re-ran the DB updates, catching the process on the error. Via the backtrace I was able to identify that the DB error for us was caused when cohesion_entity_update() was executed for an entity which had no UUID.

    (I ... don't know how the site is in a state where there's an entity with no UUID, but that was what triggered the error as reported in #4 above. I'm unfamiliar with both the site in question and Acquia Cohesion. The entity in question was a config entity, core.entity_view_display.node.person.referenced_image, and had no uuid in the config export. 🤔)

    I expect the correct solution then is to ensure that before the update is run, all configuration entities in the system have a valid UUID, so I will try that.

  • 🇮🇳India narendraR Jaipur, India

    AFAIS, this does not seems to be a core issue. I tried to reproduce it by updating core from 10.0.10 to 10.1.1 and it worked for me.

  • 🇳🇿New Zealand xurizaemon Ōtepoti, Aotearoa 🏝

    I agree, @narendraR. The error shows up during a core update, but for the case reported in #4 and which I saw here, the cause was an invalid configuration (a configuration entity somehow without a UUID assigned).

  • 🇺🇸United States emptyvoid

    This error appeared with a vanilla build of Drupal 10.1 and via composer upgraded to 10.1.2 and issued drush updatedb
    Can't move passed this error..

     -------- --------------- ------------- -------------------------------------- 
      Module   Update ID       Type          Description                           
     -------- --------------- ------------- -------------------------------------- 
      system   timestamp_for   post-update   Update timestamp formatter settings   
               matter                        for entity view displays.             
      text     allowed_forma   post-update   Add allowed_formats setting to        
               ts                            existing text fields.                 
      views    boolean_custo   post-update   Update Views config schema to make    
               m_titles                      boolean custom titles translatable.   
      views    fix_revision_   post-update   Fix '-revision_id' replacement token  
               id_part                       syntax.                               
      views    oembed_eager_   post-update   Add eager load option to all oembed   
               load                          type field configurations.            
      views    responsive_im   post-update   Add lazy load options to all          
               age_lazy_load                 responsive image type field           
                                             configurations.                       
      views    timestamp_for   post-update   Update timestamp formatter settings   
               matter                        for views.                            
     -------- --------------- ------------- -------------------------------------- 
    
    
     Do you wish to run the specified pending updates? (yes/no) [yes]:
     > 
    
    >  [notice] Update started: system_post_update_timestamp_formatter
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [error]  The "link_default" plugin does not exist. Valid plugin IDs for Drupal\Core\Field\FormatterPluginManager are: address_country_default, address_zone_default, address_default, address_plain, chart_config_default, comment_default, comment_username, comment_permalink, datetime_custom, datetime_plain, datetime_time_ago, datetime_default, daterange_default, daterange_custom, daterange_plain, faqfield_definition_list, faqfield_simple_text, faqfield_accordion, faqfield_anchor_list, faqfield_details, field_token_value_text, file_table, file_url_plain, file_link, file_default, file_rss_enclosure, file_uri, file_video, file_extension, file_filemime, file_audio, file_size, fontawesome_icon_formatter, image, image_url, link, link_separate, media_thumbnail, oembed, metatag_empty_formatter, list_key, list_default, redirect_source, responsive_image, solr_highlighted_text_default, solr_highlighted_string, entity_reference_rss_category, telephone_link, text_trimmed, text_summary_or_trimmed, text_default, url_embed, user_name, author, webform_entity_reference_link, webform_entity_reference_url, webform_entity_reference_entity_view, timestamp_ago, string, email_mailto, uri_link, number_unformatted, number_integer, number_decimal, language, entity_reference_entity_id, boolean, timestamp, entity_reference_entity_view, basic_string, entity_reference_label 
    >  [error]  Update failed: system_post_update_timestamp_formatter 
    >  [warning] Invalid placeholder (severity_level) with string: "%type: @message in %function (line %line of %file)." FormattableMarkup.php:245
    >  [warning] Invalid placeholder (exception) with string: "%type: @message in %function (line %line of %file)." FormattableMarkup.php:245
     [error]  Update aborted by: system_post_update_timestamp_formatter 
     [error]  Finished performing updates. 
    
    

    Originally ran into this while attempting to "Hot swap" a Drupal 9.5.10 to upgrade to Drupal 10.1.2
    Hangs at the example sample place.

    Pretty much stuck in either build.

  • 🇺🇸United States emptyvoid

    The plugin that the update is throwing an error is the "link_default" which has existed since Drupal 8.
    An export of the base config has it defined for any content type or block content entity with a link field.

    drush cex
    inspect a form_view config for either type and it's listed right in the config.

    YAML for: core.entity_form_display.node.page.default

    uuid: 8c39e477-6ce3-4c50-936a-3b9f3993f430
    langcode: en
    status: true
    dependencies:
      config:
        - field.field.node.page.body
        - field.field.node.page.field_link_test
        - node.type.page
      module:
        - link
        - path
        - text
    _core:
      default_config_hash: SfpLhPExzvR0MgFp0Wp7CrmgEnhcqQ-fXIWFhbf4ue0
    id: node.page.default
    targetEntityType: node
    bundle: page
    mode: default
    content:
      body:
        type: text_textarea_with_summary
        weight: 31
        region: content
        settings:
          rows: 9
          summary_rows: 3
          placeholder: ''
          show_summary: false
        third_party_settings: {  }
      created:
        type: datetime_timestamp
        weight: 10
        region: content
        settings: {  }
        third_party_settings: {  }
      field_link_test:
        type: link_default
        weight: 121
        region: content
        settings:
          placeholder_url: ''
          placeholder_title: ''
        third_party_settings: {  }
      path:
        type: path
        weight: 30
        region: content
        settings: {  }
        third_party_settings: {  }
      promote:
        type: boolean_checkbox
        weight: 15
        region: content
        settings:
          display_label: true
        third_party_settings: {  }
      status:
        type: boolean_checkbox
        weight: 120
        region: content
        settings:
          display_label: true
        third_party_settings: {  }
      sticky:
        type: boolean_checkbox
        weight: 16
        region: content
        settings:
          display_label: true
        third_party_settings: {  }
      title:
        type: string_textfield
        weight: -5
        region: content
        settings:
          size: 60
          placeholder: ''
        third_party_settings: {  }
      uid:
        type: entity_reference_autocomplete
        weight: 5
        region: content
        settings:
          match_operator: CONTAINS
          match_limit: 10
          size: 60
          placeholder: ''
        third_party_settings: {  }
    hidden: {  }
    

    Adding a conditional check for "null" strings, objects and arrays may stop this from blocking valid updates.

  • 🇺🇸United States emptyvoid

    Switching the validation to false (as in skip invalid or non-existant classes) doesn't stop reporting errors. But it does allow for the update to complete and allow subsequent updates to run.

    ------- --------------- ------------- -------------------------------------- 
      Module   Update ID       Type          Description                           
     -------- --------------- ------------- -------------------------------------- 
      system   timestamp_for   post-update   Update timestamp formatter settings   
               matter                        for entity view displays.             
      text     allowed_forma   post-update   Add allowed_formats setting to        
               ts                            existing text fields.                 
      views    boolean_custo   post-update   Update Views config schema to make    
               m_titles                      boolean custom titles translatable.   
      views    fix_revision_   post-update   Fix '-revision_id' replacement token  
               id_part                       syntax.                               
      views    oembed_eager_   post-update   Add eager load option to all oembed   
               load                          type field configurations.            
      views    responsive_im   post-update   Add lazy load options to all          
               age_lazy_load                 responsive image type field           
                                             configurations.                       
      views    timestamp_for   post-update   Update timestamp formatter settings   
               matter                        for views.                            
     -------- --------------- ------------- -------------------------------------- 
    
    
     Do you wish to run the specified pending updates? (yes/no) [yes]:
     > 
    
    >  [notice] Update started: system_post_update_timestamp_formatter
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [warning] Trying to access array offset on value of type null system.post_update.php:75
    >  [notice] Update completed: system_post_update_timestamp_formatter
    >  [notice] Update started: text_post_update_allowed_formats
    >  [notice] Update completed: text_post_update_allowed_formats
    >  [notice] Update started: views_post_update_boolean_custom_titles
    >  [notice] Update completed: views_post_update_boolean_custom_titles
    >  [notice] Update started: views_post_update_fix_revision_id_part
    >  [notice] Update completed: views_post_update_fix_revision_id_part
    >  [notice] Update started: views_post_update_oembed_eager_load
    >  [notice] Update completed: views_post_update_oembed_eager_load
    >  [notice] Update started: views_post_update_responsive_image_lazy_load
    >  [notice] Update completed: views_post_update_responsive_image_lazy_load
    >  [notice] Update started: views_post_update_timestamp_formatter
    >  [notice] Update completed: views_post_update_timestamp_formatter
     [success] Finished performing updates.
    
    

    Brain dead patch attached.

  • 🇺🇸United States laura.gates

    @emptyvoid thanks for submitting the patch. However it doesn't apply to me with going from 10.0.10 to 10.1.2

  • Just updated from 9.5.0 to 10.1.2 and the error I am getting is this when I try to upgrade the Database, any ideas on how to get around it?

    It has updated most of the database but has 13 things left to update, I have tried to remove a few modules to see if that helps but nothing

    Php 8.1

    =======================================
    system module Update timestamp_formatter

    Failed: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "yoastseo_empty_formatter" plugin does not exist. Valid plugin IDs for Drupal\Core\Field\FormatterPluginManager are: comment_default, comment_permalink, comment_username, datetime_default, datetime_plain, datetime_custom, datetime_time_ago, daterange_custom, daterange_default, daterange_plain, file_video, file_table, file_audio, file_url_plain, file_size, file_default, file_filemime, file_link, file_extension, file_rss_enclosure, file_uri, gdoc_field, geocoder_geocode_formatter, geocoder_geocode_formatter_file, geocoder_geofield_reverse_geocode, geocoder_geocode_formatter_gpxfile, geocoder_geocode_formatter_kmlfile, geocoder_geocode_formatter_geojsonfile, geofield_default, geofield_latlon, geofield_google_map, geolocation_map, geolocation_sexagesimal, geolocation_token, geolocation_latlng, image, image_url, leaflet_formatter_default, link_separate, link, metatag_empty_formatter, list_default, list_key, redirect_source, responsive_image, simple_gmap, smartdate_plain, smartdate_duration, smartdate_custom, smartdate_default, smartdate_recurring, smartdate_dailyrange, styled_google_map_default, entity_reference_rss_category, telephone_link, text_default, text_trimmed, text_summary_or_trimmed, author, user_name, video_embed_field_colorbox, video_embed_field_thumbnail, video_embed_field_lazyload, video_embed_field_video, webform_entity_reference_url, webform_entity_reference_entity_view, webform_entity_reference_link, yoastseo_formatter, number_decimal, email_mailto, language, timestamp_ago, uri_link, timestamp, boolean, string, entity_reference_entity_id, entity_reference_entity_view, entity_reference_label, number_unformatted, number_integer, basic_string in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /home/uk1host/public_html/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

  • 🇳🇿New Zealand xurizaemon Ōtepoti, Aotearoa 🏝

    Making sure you each see the common error message here:

    1. #9: [error] The "link_default" plugin does not exist.
    2. #11: [error] The "date" plugin does not exist.
    3. #12: The "yoastseo_empty_formatter" plugin does not exist.

    #4 and #6 were similar, but configuration referenced an invalid content entity (via missing UUID) in that case.

    Looks to me the update is failing when Drupal rejects a configuration that doesn't match the available configuration state (because the plugin provider is not present, or cache not rebuilt, IDK).

    I'd suggest to investigate the underlying cause, which may relate to whether the configuration is valid.

    This issue is currently "needs steps to reproduce" - progressing it may require providing the exact steps taken and/or more details about the invalid configuration state.

  • Status changed to Postponed: needs info 10 months ago
  • this is what it is asking me to upgrade, once I click apply pending updates

    ====
    13 pending updates

    SYSTEM MODULE
    Update timestamp formatter settings for entity view displays.

    TEXT MODULE
    Add allowed_formats setting to existing text fields.

    VIEWS MODULE
    Update Views config schema to make boolean custom titles translatable.
    Fix '-revision_id' replacement token syntax.
    Add eager load option to all oembed type field configurations.
    Add lazy load options to all responsive image type field configurations.
    Update timestamp formatter settings for views.

    WEBFORM MODULE
    Move from custom CKEditor to hidden 'webform_default' text format.
    Issue #3351348: '#multiple__no_items_message' added to every field.
    #3335924: Allow the confirmation page to include robots noindex meta tag.
    #3254570: Move jQuery UI datepicker support into dedicated deprecated module.
    Issue #3247475: Location field Algolia Places sunsetting May 31, 2022.
    Issue #3339769: Improve Webform categorization to support assigning multiple categories and default categories.

    updating from 9.5.10 to 10.1.2 - check all modules are compatiable

  • 🇺🇸United States laura.gates

    @xurizaemon, I did more research and patched for https://www.drupal.org/project/drupal/issues/2325899 🐛 UI fatal caused by views argument handlers no longer can provide their own default argument handling Needs work , which seams to have fixed my problem.

  • 🇮🇳India Parashram

    Could not apply patch! Skipping. The error was: Cannot apply patch #11

  • 🇮🇳India akhilsoni Ahmedabad

    Having the same setup with cohesion and Acquia module. Also wondering why the UUID is NULL for the anyof the entity. Facing the same issue. Meanwhile I have applied the patch manually which is mentioned in #18 and that worked for me. Still don't know the reason for the NULL UUID. Mentioning patch for this issue below.

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & pgsql-14.1
    last update 9 months ago
    29,470 pass, 1 fail
  • last update 9 months ago
    29,470 pass, 1 fail
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update 9 months ago
    29,470 pass, 1 fail
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.2 & sqlite-3.34
    last update 9 months ago
    29,470 pass, 1 fail
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.2 & pgsql-14.1
    last update 9 months ago
    29,470 pass, 1 fail
  • last update 9 months ago
    29,470 pass, 1 fail
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MariaDB 10.3.22
    last update 9 months ago
    29,470 pass, 1 fail
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & sqlite-3.27
    last update 9 months ago
    29,470 pass, 1 fail
  • 🇺🇸United States cilefen

    @akhilsoni Only test on every platform if it is necessary for the situation.

  • First commit to issue fork.
  • last update 9 months ago
    29,481 pass, 1 fail
  • @abhaisasidharan opened merge request.
  • 🇺🇸United States emptyvoid

    Used patch in #19 using Drupal 10.1.5

    Flipping the boolean to false allows me to upgrade the target fields and skip those that are not relevant to the update.
    There by properly completing the update and enabling the ability to release future update hooks both for contrib and custom modules.

Production build 0.69.0 2024