# Cannot save or delete rule openHAB 3.2.0 Release Build

**URL:** <https://community.openhab.org/t/cannot-save-or-delete-rule-openhab-3-2-0-release-build/136325>\
**Category:** Scripts & Rules\
**Created:** [May 30, 2022, 9:32pm UTC](https://community.openhab.org/t/cannot-save-or-delete-rule-openhab-3-2-0-release-build/136325 "2022-05-30T21:32:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_Barbagallo](https://community.openhab.org/user_avatar/community.openhab.org/bob_barbagallo/32/50113_2.png) [@Bob\_Barbagallo](https://community.openhab.org/u/Bob_Barbagallo)\
**Post date:** [May 30, 2022, 9:32pm UTC](https://community.openhab.org/t/cannot-save-or-delete-rule-openhab-3-2-0-release-build/136325/1 "2022-05-30T21:32:49Z")

</div>

Hi all,  
I’m having trouble deleting saving or deleting a rule. When I went to save it I got a blank screen see below. I’ve re-created the rule under another name it is fine. When I go to delete the previous rule I get a message “An error occurred while deleting: Not Found”

Log entry: 2022-05-31 05:06:19.830 [INFO] [utomation.rest.internal.RuleResource] - Received HTTP DELETE request at ‘rules/Sun\_Rise\_Trigger’ for the unknown rule ‘Sun\_Rise\_Trigger’.

Rules snapshot:

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/1/7/1766abb7046716edd1c00a7e8384d1bdba5949d9.png)

Any ideas?

Cheers,

Bob

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/4/2/4292348c49e8869b284b595f5ea9cd3b447231ce.png)

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [May 31, 2022, 2:00pm UTC](https://community.openhab.org/t/cannot-save-or-delete-rule-openhab-3-2-0-release-build/136325/2 "2022-05-31T14:00:04Z")

</div>

Force a reload of MainUI and see if the rule is still there. If so, look in /var/lib/openhab/jsondb/automation\_rules.json and see if it’s still there. If not see if it’s still in /var/lib/openhab/jsondb/automation\_rules\_disabled.json. If it’s still in one of those two files something went wrong while deleting and we can clean it up. But it’s most likely that it’s cached in the browser and a forced reload will clear it out.

---

<div class="post-metadata">

**Author:** ![Bob\_Barbagallo](https://community.openhab.org/user_avatar/community.openhab.org/bob_barbagallo/32/50113_2.png) [@Bob\_Barbagallo](https://community.openhab.org/u/Bob_Barbagallo)\
**Post date:** [May 31, 2022, 9:51pm UTC](https://community.openhab.org/t/cannot-save-or-delete-rule-openhab-3-2-0-release-build/136325/3 "2022-05-31T21:51:19Z")

</div>

Thank you @rlkoshak  
The reload did not work. I did find something in “/var/lib/openhab/jsondb/automation\_rules\_disabled.json”. I tried deleting the contents, but it comes back. What are the next steps? Thank you.

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/1/b1a6bc45b06ac5e3ef43bc240c0872d4c45f0e25.png)

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [May 31, 2022, 9:57pm UTC](https://community.openhab.org/t/cannot-save-or-delete-rule-openhab-3-2-0-release-build/136325/4 "2022-05-31T21:57:24Z")

</div>

You cannot edit that file while OH is running. You have to stop OH first, then edit, then start OH again.

---

<div class="post-metadata">

**Author:** ![Bob\_Barbagallo](https://community.openhab.org/user_avatar/community.openhab.org/bob_barbagallo/32/50113_2.png) [@Bob\_Barbagallo](https://community.openhab.org/u/Bob_Barbagallo)\
**Post date:** [June 3, 2022, 3:27pm UTC](https://community.openhab.org/t/cannot-save-or-delete-rule-openhab-3-2-0-release-build/136325/5 "2022-06-03T15:27:02Z")

</div>

Hello @rlkoshak, Per your instruction I was able to delete the contents of automation\_rules\_disabled.json. However, I still see the file in the GUI and have the bank screen when I click on it. Any ideas?

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/e/8/e8b6d24b937ee0c162a0ede51fb7ddfba6181269.png)

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [June 3, 2022, 4:13pm UTC](https://community.openhab.org/t/cannot-save-or-delete-rule-openhab-3-2-0-release-build/136325/6 "2022-06-03T16:13:18Z")

</div>

If you stopped OH, deleted the full JSON entry for `Sun_Rise_Trigger`, then restarted OH and forced reloaded your browser I’ve no idea where that entry can be coming from. It doesn’t exist anywhere on the server.

---

<div class="post-metadata">

**Author:** ![Bob\_Barbagallo](https://community.openhab.org/user_avatar/community.openhab.org/bob_barbagallo/32/50113_2.png) [@Bob\_Barbagallo](https://community.openhab.org/u/Bob_Barbagallo)\
**Post date:** [June 4, 2022, 12:10pm UTC](https://community.openhab.org/t/cannot-save-or-delete-rule-openhab-3-2-0-release-build/136325/7 "2022-06-04T12:10:54Z")

</div>

> [@rlkoshak](#):
>
> f you stopped OH, deleted the full JSON entry for `Sun_Rise_Trigger`, then restarted OH and forced reloaded your browser I’ve no idea where that entry can be coming from. It doesn’t exist anywhere on the server.

Thank you for your help, @rlkoshak . It does not seem to cause any issue with anything else. When I try and delete now I get " An error occurred while deleting: Not Found". I will continue to search and will let you know what I find. Cheers.

---

<div class="post-metadata">

**Author:** ![Bob\_Barbagallo](https://community.openhab.org/user_avatar/community.openhab.org/bob_barbagallo/32/50113_2.png) [@Bob\_Barbagallo](https://community.openhab.org/u/Bob_Barbagallo)\
**Post date:** [June 4, 2022, 5:31pm UTC](https://community.openhab.org/t/cannot-save-or-delete-rule-openhab-3-2-0-release-build/136325/8 "2022-06-04T17:31:23Z")

</div>

A quick update. I delete from automation\_rules\_disabled.json, however, it remained in automation\_rule.json. Once I deleted that and rebooted it, it disappeared. Thank you, once again.
