Ai Automator config fails on import

Created on 22 February 2025, 3 months ago

Problem/Motivation

I created some AI Automators, enabled those AI fields in the ckeditor. Everything is working great. I exported the config as I usually would whenever I edit stuff in the admin UI.

Then on a rebuild of the site, I get this error at the config import step:

Unexpected error during import with operation create for field.field.automator_chain.FIELD_NAME.ai_automator_status: Attempted to create, modify or delete an instance of field with name ai_automator_status on entity type automator_chain when the field storage does not exist.

I then need to manually run config import again and the automator fields then gets created.

Steps to reproduce

1. Create an AI automator
2. Enable this ai automator in the text format of your choice.
3. Test that it works by editing a content and using the AI Assistant ckeditor button
4. Export the config
5. Rebuild the site and notice failure at drush cim step.

🐛 Bug report
Status

Active

Version

1.1

Component

AI Automators

Created by

🇹🇹Trinidad and Tobago xamount

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

Comments & Activities

  • Issue created by @xamount
  • 🇹🇹Trinidad and Tobago xamount
  • 🇩🇪Germany marcus_johansson

    Just a question before looking into this - "FIELD_NAME" is a placeholder for a random field name, correct?

  • 🇹🇹Trinidad and Tobago xamount

    Sorry, that's actually the machine name of the AI automator, not field name.

  • 🇹🇹Trinidad and Tobago xamount

    Seems you need to have at least 2 enabled AI automators to get the issue. With one it works.

    This is a blocker for me as config import/export is crucial for a successful deployment, and no workaround exists.

  • 🇬🇧United Kingdom MrDaleSmith

    I can't recreate the error specified but I do get:

    [error]  Deleted and replaced configuration entity "field.storage.node.ai_automator_status" 
     [error]  Deleted and replaced configuration entity "field.field.node.article.ai_automator_status" 
     [error]  Unexpected error during import with operation create for field.field.node.article.ai_automator_status: 'field_config' entity with ID 'node.article.ai_automator_status' already exists. 
    

    on a drush si --existing-config for a site with two separate content types with automators set up. The field config all looks OK so I'm not sure why the install process has decided it needs to delete and recreate it.

Production build 0.71.5 2024