Can't add new media field or view media library or uninstall media module

Created on 1 July 2024, 2 months ago
Updated 8 July 2024, 2 months ago

Installed media module and media library from core and then added a field to a content type called Logo.

I got an error and a white screen of death.

"TypeError: Drupal\Core\Entity\Sql\DefaultTableMapping::requiresDedicatedTableStorage(): Argument #1 ($storage_definition) must be of type Drupal\Core\Field\FieldStorageDefinitionInterface, null given, called in /home/feafccef/public_html/dev/website.co/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php on line 332 in Drupal\Core\Entity\Sql\DefaultTableMapping->requiresDedicatedTableStorage() (line 522 of /home/feafccef/public_html/dev/website.co/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php)."

I now can't uninstall the media module.

update.php shows no errors.

πŸ› Bug report
Status

Closed: cannot reproduce

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated less than a minute ago

Created by

πŸ‡¬πŸ‡§United Kingdom effortDee

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

Comments & Activities

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

    Are any other logged errors affiliated with that one?

  • πŸ‡¬πŸ‡§United Kingdom effortDee

    Hi @cilefen

    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'feafccef_drup863.drcu_media' doesn't exist: SELECT "base_table"."vid" AS "vid", "base_table"."mid" AS "mid" FROM "drcu_media" "base_table" GROUP BY "base_table"."vid", "base_table"."mid" LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Query\Sql\Query->result() (line 272 of /home/feafccef/public_html/dev/website.co/core/lib/Drupal/Core/Entity/Query/Sql/Query.php).

    I get this if I go to the uninstall module page and its a white screen wit the following message.

    The website encountered an unexpected error. Try again later.

    I forgot to add this is a brand new Drupal 10.3 install and no other issues the past few days working on the site.

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

    What does "drcu" mean on that site? That isn't part of Drupal core.

  • πŸ‡¬πŸ‡§United Kingdom effortDee

    I have no idea.....

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

    Is every table in the site prefixed with drcu_? mid and vid are well-known columns in what is normally called the media table. That site could be table-prefixing, which should not be a problem on its own. However it points to needing some more steps to reproduce. The table wasn't created as expected obviously.

  • πŸ‡¬πŸ‡§United Kingdom effortDee

    So I used Softaculous to install the new Drupal site and it seems that it is adding table prefixes.

    These table prefixes have been added like this in previous website builds i've done with no issue for media library or module but here it is....

    I have removed and re-installed a fresh D10.3 and installed media module with no issues now.

  • Status changed to Closed: cannot reproduce 2 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cilefen
Production build 0.71.5 2024