- Issue created by @ragnarkurm
- First commit to issue fork.
- Merge request !478Apply patch to ensure token mode updates on save. #3508503 → (Open) created by MrDaleSmith
- 🇬🇧United Kingdom MrDaleSmith
Can recreate the issue and confirm that the patch resolves it. RTBC. I've added the PR to a MR to make it easier for the maintainers.
- 🇩🇪Germany marcus_johansson
I think the issue is my description of this checkbox is bad and a missing description written by a native speaker might be part of a bug issue.
What the checkbox is suppose to do, is to look at any context field that exists and see if they got changed - then the automator should run again.
So if you have a article text field and you have a summary field that is automatically populated with automators. If this is checked, the idea is that if you change the article text field, then the summary should be recreated.
Having it run everytime a node gets updated would be bad, if you have automatic updates of nodes for whatever reasons, since it can end up costing you a lot of money.
I'm thinking if we should even hide this on advanced mode, since it would be quite hard to check if token values have changed?
I'll set this issue to active again. Sorry about the confusion.
- 🇬🇧United Kingdom MrDaleSmith
I think the issue is that if you use token mode and one of the inputs does change, your content isn't regenerated. We need SOME way of preventing that happening, otherwise this is a once only generation task and that's going to be confusing for people/slightly useless.
- 🇨🇦Canada ydahi Waterloo, Canada
Patch works as expected on: Drupal 10.4.4, AI 1.0.5.
It will re-generate on node save - even if no field values are changed.
This, in my use case, is better than no-regeneration at all. As pointed out by others, a full solution will include some sort of check of changed fields before re-gen/no-re-gen.
Side note: I've altered my prompt to attempt to preseve any existing generated content if it's still relevant - this seems to be helping reduce the unexpected behaviour of the entire content changing on edit/save.
- 🇮🇳India annmarysruthy
On applying the current MR, the automated field values update on each node save if 'Edit when changed' checkbox is enabled. This is not a recommended practice. Also the checkbox is labelled 'Edit when changed', the user is not warned that content of automated fields changes everytime on node save.
Proposed Resolutions:
- Retrieve tokens used in prompt and check if token values used have changed - This is a tough one
- On selecting 'Advanced Mode(Token)' ,Hide 'Edit when changed' checkbox or Rename the label and description of checkbox, so that user will know that on enabling the checkbox, the automated field value changes on every edit and this adds to load'
- 🇮🇳India prashant.c Dharamshala
I agree with #7 🐛 Automators: "Edit when changed" ignored in "Advanced Mode (Token)" Active .
Since multiple tokens might be used, checking each token for changes would be challenging. Some tokens, like date/time tokens, will always have a different value, making validation even harder.
Instead, we could refine the checkbox label and description to better communicate its function. Additionally, we can include a note explaining the implications of enabling this option. By default, the checkbox should remain disabled, allowing site builders to enable it based on their specific needs.
I suggest something like:
Checkbox label: "Auto-Update on Change"
Description for checkbox: "By default, the initial value or manually set value remains unchanged, even if the base text field is updated. Check this option to automatically update the value whenever the base text field changes.
Note: Enabling this may trigger multiple calls to the LLM, potentially increasing API usage and costs."Thankyou