- Issue created by @developer-rocha
- Assigned to marcus_johansson
- 🇵🇹Portugal developer-rocha
This patch addresses an issue when accessing the ai_automator_status field within the AutomatorFieldData.php file in the ai_automator module. Previously, the code used
$entity->set('ai_automator_status', AiAutomatorStatusField::STATUS_FINISHED)
to set the field status, which caused inconsistencies during the queue processing.The proposed solution replaces the field-setting method with a direct assignment, i.e.,
$entity->ai_automator_status = AiAutomatorStatusField::STATUS_FINISHED
. This change ensures that the field is correctly updated when the queue status is changed to STATUS_FINISHED or STATUS_FAILED, maintaining the expected system behavior during entity saving.This adjustment improves stability and consistency in handling the ai_automator_status field within the queue processing.
-
marcus_johansson →
committed f3f1da9e on 1.0.x
Issue #3474960 by marcus_johansson: Ai Automators doesn't works with...
-
marcus_johansson →
committed f3f1da9e on 1.0.x
- 🇩🇪Germany marcus_johansson
@developer-rocha This was a pretty bad oversight for me when moving the AI Interpolators third party settings to AI Automators config entities.
When you add you first Automator Type to a enitity or entity/bundle that doesn't have one, it needs to create a field that is called AI Automator Status that is used for cron/queue or for API requests where you want to see when the processing is finished.
The function that checked if this was needed to be added was still looking in third party settings. This has now been fixed with the following commits: https://git.drupalcode.org/project/ai/-/commit/f3f1da9e5b8ecdb3c2d067f71...
The merge train is running, when that is done could you test this by downloading the latest dev package and:
1. Resaving the field that has an Automator Type on it.
2. That should make the field AI Automator Status show up.
3. Now cron job should be possible.If that works, feel free to set to Fixed, otherwise set back to Needs Work.
- Status changed to Needs review
2 months ago 3:00pm 19 September 2024 - 🇵🇹Portugal developer-rocha
@marcus_johasson - You are right and your solution works for me. Thank you!
-
marcus_johansson →
committed f3f1da9e on mock-stream-response
Issue #3474960 by marcus_johansson: Ai Automators doesn't works with...
-
marcus_johansson →
committed f3f1da9e on mock-stream-response
Automatically closed - issue fixed for 2 weeks with no activity.