- Issue created by @MrDaleSmith
- Merge request !425Add settings to allow the user to choose which entities the module is used on,... β (Closed) created by MrDaleSmith
- π¬π§United Kingdom MrDaleSmith
I decided we'd be best off not trying to automate this because the existing form alter includes string field types and the majority of content entities have at least one string field: filtering out all the ones we assume it won't make sense to use the AI on would add a lot of conditionals and mean we might block users from doing something they want to do.
Instead I've added a settings form to let users decide for themselves, and an update hook that sets the settings to preserve the previous behaviour for anyone who was already using the module.
- π§πͺBelgium wouters_f Leuven
Tested this:
Gave me this error:
NOTICE: PHP message: Uncaught PHP Exception AssertionError: "Failed to assert that "ai_content_suggestions_plugins, ai_providers, entity_types, user.roles:authenticated" are valid cache contexts." at /var/www/html/web/core/lib/Drupal/Core/Cache/Cache.php line 31
If i removed the line$form['#cache']['contexts'][] = 'entity_types';
From the Settings form, it worked as expected.
- π§πͺBelgium wouters_f Leuven
(there is also a merge conflict which might prevent it from getting merged. might be best to resolve that too).
- π¬π§United Kingdom MrDaleSmith
That error comes if you don't clear caches after adding the new ca he context: can you confirm if you did that?
- Status changed to Postponed: needs info
about 1 month ago 4:55pm 5 July 2025 - πΊπΈUnited States Kristen Pol Santa Cruz, CA, USA
We are doing some issue management housekeeping and adding/removing components.
We are removing the "Other Submodules" component and want people to categorize issues with the best module/submodule component.
Moving this issue to "AI Content Suggestions".
See π Update AI module project components Active for more details.