[SOLVED] "Action must be edited to update to the latest stored form"
-
TLDR: I'm getting an alert saying I have to edit and re-save a rule containing a HTTP POST request in order to update it, but following the instructions in the alert doesn't seem to fix the issue.
I am receiving this message in the Current Alerts when sending a HTTP POST request.
The action at step 1 of "Send Notification Reaction" (re-I7yq7e15) needs to be edited to update it to the latest stored form. The action will continue, but should be updated as soon as possible, before this form is deprecated and no longer functions. Just make a trivial edit to the "headers" argument and then save the reaction to update it.
Details:
I am using a self-hosted notification system - Gotify. Many of my rules use a HTTP POST action to send a notification through this system. The message contains a JSON body with the title, body, and message priority. It is posted to a URL on my LAN where the Gotify server resides.
When I updated to latest-22252-65e94b36 I started to receive the above error. Since I had the http request in many rules I took the opportunity to simplify things by moving the http request to a Reaction in the Reactions section of MSR. I created two variables to pass the notification content to the Reaction and now send all notifications via the one Reaction. Each rule that needs to send a reaction sets the variable values and then runs the Reaction.
For example, this rule runs if the Kitchen Main leak sensor detects a leak. It sets the variable "g_gotify_token" to a value (this is used as part of the URL when making the HTTP request) and sets "g_gotify"body" to a JSON formatted string. In this case that string is
{ "title":"Water Alert", "message": "Kitchen Main Leak Sensor Tripped", "priority": 8 }
Finally, the rule runs the Reaction "Send Notification Reaction"
That reaction contains the http request. It uses the variables in the URL and request body fields. The request headers field is static and is set to "Content-Type: application/json"
I get the same error when I directly call the HTTP request from a rule without using any variables. Either way, the notification goes through successfully. The only issue is the alert being raised in MSR.
I tried editing and re-saving the Reaction, and also tried creating an entirely new reaction. I get the same warning message either way.
footnote: Because I use the same process to send a notification whenever there is an alert raised in MSR, this also created a loop (that thankfully got throttled pretty quickly) where the system was making the http request to send a notification that this alert had been raised, and the action of sending that notification raised the alert again... etc...
Is this just a bug? Am I missing something about the request format that needs to be updated? I checked the manual and this forum for answers, but didn't find anything that looked relevant.
-
Did you specifically modify the "headers" field as the notice directed?
-
@toggledbits said in "Action must be edited to update to the latest stored form":
Did you specifically modify the "headers" field as the notice directed?
I have but still get the Info alert coming back again..
-
@toggledbits I've tried editing the headers field to add and then remove a space, and I tried deleting the headers entirely. That caused them to default to "Content-Type: application/x-www-form-urlencoded". I saved that and then changed it back to the application/json header. Still getting the error.
-
This warning can be ignored for HTTP Request actions only. It should be heeded for all other types. I will silence the notice on the next build.
-
2/5