Missing dependency on core Image module

Created on 22 May 2022, about 2 years ago
Updated 31 May 2023, about 1 year ago

Problem/Motivation

This module depends upon the core Image module, however a dependency is not declared. When installing the module without the Image module already installed, an error is thrown:

  The "image" plugin does not exist. V
  alid plugin IDs for Drupal\Core\Fiel
  d\FieldTypePluginManager are: commen
  t, datetime, daterange, entity_refer
  ence_revisions, file, file_uri, font
  awesome_icon, layout_section, link,
  list_float, list_integer, list_strin
  g, path, redirect_source, remote_ima
  ge, text, text_long, text_with_summa
  ry, boolean, changed, created, decim
  al, email, entity_reference, float,
  integer, language, map, password, st
  ring, string_long, timestamp, uri, u
  uid

Trying to then uninstall the module results in the following error:

SQLSTATE[42S02]: Base table or view
  not found: 1146 Table 'db.website_fe
  edback' doesn't exist: SELECT "base_
  table"."id" AS "id", "base_table"."i
  d" AS "base_table_id"
  FROM
  "website_feedback" "base_table"
  LIMIT 1 OFFSET 0; Array
  (
  )

Note: if you are stuck in this loop, manually create the table webform_feedback (it just has to exist, it doesn't need any columns or content), then uninstall the module. Install the image module, then re-install this module.

Steps to reproduce

1) Ensure the Image module is NOT enabled
2) Enable this module with Drush
3) Observe the error
4) Try to uninstall the module with Drush
5) Observe the next error

Proposed resolution

Add a dependency on the core image module.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇦Canada Jaypan

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024