Problem/Motivation

I am using an Acquia Drupal Starter Kit for my site and their module Acquia Drupal Starter Kit Image has the media image field machine name set to image. When trying to use this module, I am unable to upload an image or save an AI created image.

Steps to reproduce

  1. Install an site using an Acquia Drupal Starter
  2. Enable and configure AI Media Image
  3. Create an Article with an uploading image or AI created image.

Proposed resolution

Update code where field_media_image is hardcoded.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kevinfunk created an issue. See original summary.

kevinfunk’s picture

Status: Active » Needs review
kevinfunk’s picture

Title: Media image field machine name should not be hardcoded » Remove hardcoded media image field name
freelock’s picture

Status: Needs review » Reviewed & tested by the community

My site uses "field_image" for the image field name in Media. Before applying this patch, I could generate an image, but after saving it was lost entirely, and the media item had no thumbnail or anything.

After applying this patch, it works as expected -- after generating the image, it's properly attached to the media item.

coffeymachine made their first commit to this issue’s fork.

coffeymachine’s picture

Status: Reviewed & tested by the community » Fixed

Nice catch, thanks @kevinfunk. Merged.

Status: Fixed » Closed (fixed)

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

coffeymachine’s picture

Adding credit.