-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing a rule from a file doesn't save the rule. #230
Comments
Thanks, @bugfolder. LGTM. Incidentally, the file upload widget should be required. Otherwise you get a fatal error when submitting without having selected a file. I'll open a new issue. |
argiepiano
added
pr - ready to be committed
and removed
pr - maintainer review requested
labels
May 4, 2024
argiepiano
added a commit
that referenced
this issue
Jun 5, 2024
Issue #230: Properly save rules imported from files.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you try importing a rule from a file via
admin/config/workflow/rules/reaction/import_file
, although the process completes with no errors, the status message says the rule was imported, and watchdog log reports that it was imported, it was never saved to the db and therefore doesn't exist.However, importing the rule by pasting its data in via
admin/config/workflow/rules/reaction/import
works just fine.This appears to be because the function
rules_ui_import_file_form_submit()
is missing the call to$rules_config->save()
that is present in functionrules_ui_import_form_submit()
. And indeed, copying the same code over fixes the problem.A test rule for importing (to verify the issue) is attached.
PR to follow.
rules_test_rule.json
The text was updated successfully, but these errors were encountered: