Write a schema file for AI Automators

Created on 21 July 2025, 23 days ago

Problem/Motivation

Currently we do not have a schema file at all for the AI Automators configuration entity. This was not seen in error messages due to a typo, but when the typo is fixed we also need to add a schema.

Proposed resolution

Add schema for configuration entity.

🐛 Bug report
Status

Active

Version

1.2

Component

AI Automators

Created by

🇩🇪Germany marcus_johansson

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

Merge Requests

Comments & Activities

  • Issue created by @marcus_johansson
  • Merge request !776Resolve #3537226 "Write a schema" → (Merged) created by marcus_johansson
  • 🇨🇦Canada bisonbleu

    The MR patch does not apply, so I had to do it manually.

    I think we're making progress. Now when I save at admin/structure/types/manage/page/automator_chain I'm only seeing this:

    Warning message
    
        Schema errors for ai_automators.ai_automator.node.page.field_extract_general_sentiment.default with the following errors: ai_automators.ai_automator.node.page.field_extract_general_sentiment.default:disabled missing schema. These errors mean there is configuration that does not comply with its schema. This is not a fatal error, but it is recommended to fix these issues. For more information on configuration schemas, check out <a href="https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-schemametadata">the documentation</a>.
        Schema errors for ai_automators.ai_automator.node.page.field_plain_text_long.default with the following errors: ai_automators.ai_automator.node.page.field_plain_text_long.default:disabled missing schema. These errors mean there is configuration that does not comply with its schema. This is not a fatal error, but it is recommended to fix these issues. For more information on configuration schemas, check out <a href="https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-schemametadata">the documentation</a>.
        Schema errors for ai_automators.ai_automator.node.page.field_sentiment_score.default with the following errors: ai_automators.ai_automator.node.page.field_sentiment_score.default:disabled missing schema. These errors mean there is configuration that does not comply with its schema. This is not a fatal error, but it is recommended to fix these issues. For more information on configuration schemas, check out <a href="https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-schemametadata">the documentation</a>.
        No schema for ai_automators.settings. These errors mean there is configuration that does not comply with its schema. This is not a fatal error, but it is recommended to fix these issues. For more information on configuration schemas, check out <a href="https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-schemametadata">the documentation</a>.

    Also, in 'Manage form display' settings, the following fields do not display the FWA field-set:

    - Widget settings: Autocomplete // this one use to work fine I think
    - Widget settings: Datetime Timestamp
    - Widget settings: URL alias
    - Widget settings: Text area (multiple rows) // this one use to work fine
    - Widget settings: Comment

  • 🇨🇦Canada bisonbleu

    FYI and in case it helps:

    Gathering patches for dependencies. This might take a minute.
      - Installing drupal/ai (dev-1.2.x 1c45646): Cloning 1c45646c9e from cache
      - Applying patches for drupal/ai
        https://git.drupalcode.org/project/ai/-/merge_requests/490.patch (Adding Disable Option for AI Automators)
        https://git.drupalcode.org/project/ai/-/merge_requests/776.patch (Write a schema)
       Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/ai/-/merge_requests/776.patch
  • 🇩🇪Germany marcus_johansson

    See 📌 Add schema validation tests Active - we should add this, so we can automatically catch such errors.

  • 🇨🇦Canada bisonbleu

    I think there might be 2 issues here:

    • There's the AI Automator config entity schema issue;
    • And there's also a field_widget_actions third-party settings schema issue;

    I can confirm that the patch fixes the first issue after drush pm:uninstall field_widget_actions. I was able to successfully test the patch by setting up a new automator on field_tags. When saving an article the ai/llm generates 3 tags that best encapsulates the Body text; I see no errors in the dblog. So I believe the current patch works as designed.

    Now, either we expand the scope of this issue to include the field_widget_actions third-party settings schema issue OR we create another issue for that. Let me know. In the meantime I will provide more info shortly.

  • 🇩🇪Germany marcus_johansson

    If this is fixed, I will merge it if you think the Automators does work - the Field Widget Actions I have created an schema issue for here 📌 Add schema definitions for third party for Field Widget Actions Active .

  • 🇨🇦Canada bisonbleu

    OK, makes sense, setting to RTBC

  • 🇩🇪Germany marcus_johansson

    Thanks, getting merged.

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

Production build 0.71.5 2024