"Column not found: 1054 Unknown column 'revision_user'" when inserting media

Created on 8 February 2023, over 1 year ago
Updated 9 September 2023, 10 months ago

Problem/Motivation

Several things do not work

Steps to reproduce

I created a content type with a media field. If I try to create an instance of this, nothing happens when I click the add media button

If I try to add media from Content/Media/add/file, I get two php errors
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision_user' in 'field list': INSERT INTO "stelnewsmedia_revision" ("mid", "langcode", "revision_user", "revision_created", "revision_log_message", "revision_default") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => 23 [:db_insert_placeholder_1] => en [:db_insert_placeholder_2] => 13 [:db_insert_placeholder_3] => 1675866030 [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => 1 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->saveRevision() (line 1151 of /srv/www/htdocs/ssl2/sn/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
and
Drupal\Core\Entity\EntityStorageException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision_user' in 'field list': INSERT INTO "stelnewsmedia_revision" ("mid", "langcode", "revision_user", "revision_created", "revision_log_message", "revision_default") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => 23 [:db_insert_placeholder_1] => en [:db_insert_placeholder_2] => 13 [:db_insert_placeholder_3] => 1675866030 [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => 1 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 815 of /srv/www/htdocs/ssl2/sn/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: cannot reproduce

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡ΊπŸ‡ΈUnited States tjtj

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

Comments & Activities

  • Issue created by @tjtj
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    The steps to reproduce describe a normal activity. Is this replicable on a clean install (using, for example, https://simplytest.me and selecting "Drupal Core")? Or, are contributed modules needed?

    There is no evident data loss so I am moving this to major priority.

  • πŸ‡ΊπŸ‡ΈUnited States tjtj

    There is no issue with the site I built from scratch in D10.
    The offending site is an upgrade a la https://blogs.jamesrome.net/drupal10_upgrade

  • πŸ‡ΊπŸ‡ΈUnited States tjtj

    I removed the media_library and Media modules, and reinstalled them. This fixed the database error adding content in Content/Media/add/file
    But after enabling the media module (and before media_libraru, I get
    Error A non-existent config entity name returned by
    FieldStorageConfigInterface::getBundles(): entity type: node, bundle:
    panels_page, field name: body
    And then adding Media to a media field in a node, I click Add media, I see a circle (opening media library), and nothing happens.
    Under the Add media, it says "2 media items remaining"
    There is nothing thrown in drush ws

  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    There is no evident data loss so I am moving this to major priority.

    It looks like table stelnewsmedia_revision needs a revision_user column but doesn't have one. But now we are working a different error?

  • Status changed to Postponed: needs info over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States cilefen
  • Status changed to Closed: cannot reproduce 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States Chris Matthews

    Clear steps to reproduce have not been provided in 7 months so closing this issue accordingly. If clear steps to reproduce can be provided then please feel free to reopen.

Production build 0.69.0 2024