AI Content Suggestions cannot be used with custom Entities

Created on 13 November 2024, 9 months ago
Updated 23 January 2025, 7 months ago

Problem/Motivation

The current version of the AI Content Suggestions module can only be used with Nodes and Taxonomy terms because of the way the form alters are handled. This is so that it doesn't get added to entities where it does not provide any useful features (because the entities don't have any fields that are compatible), but it means users who use custom entities for the site cannot cannot use the module.

Proposed resolution

What I'd suggest is that we use hook_entity_type_alter to set a marker on all entities that have compatible fields (mostly text fields) so that a hook_form_alter can check if the current form implements the ContentEntityFormInterface and check for the flag on the entity before running the form alter service that enables the content plugins.

We could also add an admin form that allows users to deselect any entities discovered programmatically that they don't want the module used on, giving more fine-grained control.

✨ Feature request
Status

Active

Version

1.0

Component

Other Submodules

Created by

πŸ‡¬πŸ‡§United Kingdom MrDaleSmith

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024