Skip to content
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

Server error when updating configuration on Custom styles without content #185

Open
PierreMesure opened this issue May 17, 2022 · 0 comments

Comments

@PierreMesure
Copy link

Describe the bug

When clicking on the button Update configuration on the Custom styles tab without any custom styles, I get a server error.

See stacktrace:

NoMethodError (undefined method `with_indifferent_access' for nil:NilClass):
  
rectify (0.13.0) lib/rectify/form.rb:54:in `hash_from'
rectify (0.13.0) lib/rectify/form.rb:11:in `from_params'
decidim-module-decidim_awesome (658d226e9ed1) app/forms/decidim/decidim_awesome/admin/config_form.rb:35:in `from_params'
decidim (5455ffe38454) decidim-core/app/controllers/concerns/decidim/form_factory.rb:65:in `from_params'
decidim-module-decidim_awesome (658d226e9ed1) app/controllers/decidim/decidim_awesome/admin/config_controller.rb:26:in `update'
actionpack (6.0.5) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (6.0.5) lib/abstract_controller/base.rb:195:in `process_action'
actionpack (6.0.5) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (6.0.5) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport (6.0.5) lib/active_support/callbacks.rb:112:in `block in run_callbacks'
activesupport (6.0.5) lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
decidim (5455ffe38454) decidim-core/app/controllers/concerns/decidim/use_organization_time_zone.rb:21:in `use_organization_time_zone'
activesupport (6.0.5) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
i18n (1.10.0) lib/i18n.rb:328:in `with_locale'
decidim (5455ffe38454) decidim-core/app/controllers/concerns/decidim/locale_switcher.rb:24:in `switch_locale'
activesupport (6.0.5) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
activesupport (6.0.5) lib/active_support/callbacks.rb:139:in `run_callbacks'
actionpack (6.0.5) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (6.0.5) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (6.0.5) lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
activesupport (6.0.5) lib/active_support/notifications.rb:180:in `block in instrument'
activesupport (6.0.5) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.0.5) lib/active_support/notifications.rb:180:in `instrument'
actionpack (6.0.5) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
actionpack (6.0.5) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (6.0.5) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (6.0.5) lib/abstract_controller/base.rb:136:in `process'
actionview (6.0.5) lib/action_view/rendering.rb:39:in `process'
actionpack (6.0.5) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (6.0.5) lib/action_controller/metal.rb:254:in `dispatch'
actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack (6.0.5) lib/action_dispatch/journey/router.rb:49:in `block in serve'
actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:834:in `call'
railties (6.0.5) lib/rails/engine.rb:527:in `call'

To Reproduce
Steps to reproduce the behavior:

  1. Go to /admin/decidim_awesome/config/styles
  2. Click on Update configuration
  3. See a message There was a problem with our server.

Expected behavior

Clicking on this button when there is no content is useless so this is very low priority. But I'm expecting this button to be disabled or the behaviour to be nothing. In any case, no crash.

Desktop (please complete the following information):

  • Version: Decidim 0.25.2, Decidim_Awesome 0.8.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant