# 500 error when saving category security settings

**URL:** <https://meta.discourse.org/t/500-error-when-saving-category-security-settings/231055>\
**Category:** Bug\
**Tags:** restricted-replies\
**Created:** [June 24, 2022, 9:54pm UTC](https://meta.discourse.org/t/500-error-when-saving-category-security-settings/231055 "2022-06-24T21:54:42Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [June 25, 2022, 11:36am UTC](https://meta.discourse.org/t/500-error-when-saving-category-security-settings/231055/2 "2022-06-25T11:36:22Z")

</div>

Hello and welcome @hierocles 🙂

I have just installed this plugin on my test site for a repro, and I can confirm that I receive the same 500 error when trying to add a group to the Restricted Reply security setting:

```plaintext
NoMethodError (undefined method `[]=' for nil:NilClass)
app/controllers/categories_controller.rb:173:in `block in update'
app/controllers/application_controller.rb:727:in `json_result'
app/controllers/categories_controller.rb:154:in `update'
app/controllers/application_controller.rb:415:in `block in with_resolved_locale'
app/controllers/application_controller.rb:415:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:368:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:202:in `call'

Backtrace

plugins/discourse-restricted-replies/plugin.rb:43:in `block in category_params'
plugins/discourse-restricted-replies/plugin.rb:41:in `tap'
plugins/discourse-restricted-replies/plugin.rb:41:in `category_params'
app/controllers/categories_controller.rb:173:in `block in update'
app/controllers/application_controller.rb:727:in `json_result'
app/controllers/categories_controller.rb:154:in `update'
actionpack (7.0.3) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (7.0.3) lib/abstract_controller/base.rb:215:in `process_action'
actionpack (7.0.3) lib/action_controller/metal/rendering.rb:53:in `process_action'
actionpack (7.0.3) lib/abstract_controller/callbacks.rb:234:in `block in process_action'

```

We’ll get someone to look into that shortly. 👍

---

_[View the full topic](https://meta.discourse.org/t/500-error-when-saving-category-security-settings/231055)._
