spree-contrib / spree_multi_currency

Provides UI to allow configuring multiple currencies in Spree.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
41 stars 118 forks source link

Unable to load general settings [WARNING] No :original defined for 'multiple-currency' #90

Closed amitpatelx closed 5 years ago

amitpatelx commented 5 years ago

The page admin/general_settings/edit doesn't get load and server show following error

  ↳ /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/bundler/gems/spree_admin_roles_and_access-b1fbacfc01df/app/models/spree/ability_decorator.rb:16
  Spree::Permission Load (0.5ms)  SELECT "spree_permissions".* FROM "spree_permissions" WHERE "spree_permissions"."id" = $1 ORDER BY "spree_permissions"."priority" ASC  [["id", 1]]
  ↳ /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/bundler/gems/spree_admin_roles_and_access-b1fbacfc01df/app/models/spree/ability_decorator.rb:16
Deface: 2 overrides found for 'spree/admin/general_settings/edit'
Deface: 'add_favorite_products_per_page_configuration' matched 1 times with '#preferences fieldset .form-actions'
Deface: 'multiple-currency' matched 2 times with '.form-group'
Deface: [WARNING] No :original defined for 'multiple-currency', you should change its definition to include:
 :original => 'fc7a9c51741e715dbefca394dac231931eb37782' 
Deface: [WARNING] No :original defined for 'multiple-currency', you should change its definition to include:
 :original => 'a088b96e7cfcddb5a80d89f2b3341275d566125b' 
Completed 500 Internal Server Error in 212ms (ActiveRecord: 90.9ms)

exception reentered excluded from capture: DSN not set

fatal (exception reentered):

#<Thread:0x000055d89ca82af8@puma 002@/home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/puma-3.12.1/lib/puma/thread_pool.rb:89 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
/home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `catch': exception reentered (fatal)
/home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `catch': can't modify frozen fatal (FrozenError)
    80: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/puma-3.12.1/lib/puma/thread_pool.rb:135:in `block in spawn_thread'
    79: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/puma-3.12.1/lib/puma/server.rb:334:in `block in run'
    78: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/puma-3.12.1/lib/puma/server.rb:474:in `process_client'
    77: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/puma-3.12.1/lib/puma/server.rb:660:in `handle_request'
    76: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/puma-3.12.1/lib/puma/configuration.rb:227:in `call'
    75: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/railties-5.2.3/lib/rails/engine.rb:524:in `call'
    74: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/sentry-raven-2.9.0/lib/raven/integrations/rack.rb:51:in `call'
    73: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call'
    72: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/static.rb:127:in `call'
    71: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/executor.rb:14:in `call'
    70: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/rack-2.0.7/lib/rack/runtime.rb:22:in `call'
    69: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/rack-2.0.7/lib/rack/method_override.rb:22:in `call'
    68: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/request_id.rb:27:in `call'
    67: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/request_store-1.4.1/lib/request_store/middleware.rb:19:in `call'
    66: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
    65: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
    64: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/railties-5.2.3/lib/rails/rack/logger.rb:26:in `call'
    63: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:71:in `tagged'
    62: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:28:in `tagged'
    61: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:71:in `block in tagged'
    60: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/railties-5.2.3/lib/rails/rack/logger.rb:26:in `block in call'
    59: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/railties-5.2.3/lib/rails/rack/logger.rb:38:in `call_app'
    58: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
    57: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `call'
    56: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `catch'
    55: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:30:in `block in call'
    54: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:135:in `call_app'
    53: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
    52: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:71:in `rescue in call'
    51: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/sentry-raven-2.9.0/lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb:11:in `render_exception'
    50: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/extensions.rb:28:in `render_exception_with_web_console'
    49: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:87:in `render_exception'
    48: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:102:in `render_for_browser_request'
    47: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:46:in `render'
    46: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/logger.rb:63:in `block (2 levels) in broadcast'
    45: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/logger_silence.rb:21:in `silence'
    44: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/logger.rb:65:in `block (3 levels) in broadcast'
    43: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/logger_silence.rb:21:in `silence'
    42: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:46:in `block in render'
    41: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/helpers/rendering_helper.rb:33:in `render'
    40: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/renderer.rb:25:in `render'
    39: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/renderer.rb:44:in `render_template'
    38: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/template_renderer.rb:16:in `render'
    37: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/template_renderer.rb:52:in `render_template'
    36: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
    35: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
    34: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/abstract_renderer.rb:43:in `instrument'
    33: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168:in `instrument'
    32: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
    31: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168:in `block in instrument'
    30: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/abstract_renderer.rb:44:in `block in instrument'
    29: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
    28: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/deface-1.4.0/lib/deface/action_view_extensions.rb:41:in `render'
    27: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/template.rb:157:in `render'
    26: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/template.rb:354:in `instrument_render_template'
    25: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/notifications.rb:170:in `instrument'
    24: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/template.rb:159:in `block in render'
    23: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb:15:in `_4669a2f402a75154621ed2ec014a59a8'
    22: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:46:in `render'
    21: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/logger.rb:63:in `block (2 levels) in broadcast'
    20: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/logger_silence.rb:21:in `silence'
    19: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/logger.rb:65:in `block (3 levels) in broadcast'
    18: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/logger_silence.rb:21:in `silence'
    17: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:46:in `block in render'
    16: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/helpers/rendering_helper.rb:33:in `render'
    15: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/renderer.rb:25:in `render'
    14: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/renderer.rb:44:in `render_template'
    13: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/template_renderer.rb:16:in `render'
    12: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/template_renderer.rb:52:in `render_template'
    11: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
    10: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
     9: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/abstract_renderer.rb:43:in `instrument'
     8: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168:in `instrument'
     7: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
     6: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168:in `block in instrument'
     5: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/abstract_renderer.rb:44:in `block in instrument'
     4: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
     3: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/deface-1.4.0/lib/deface/action_view_extensions.rb:41:in `render'
     2: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/template.rb:156:in `render'
     1: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/template.rb:162:in `rescue in render'
/home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionview-5.2.3/lib/action_view/template.rb:323:in `handle_render_error': can't modify frozen fatal (ActionView::Template::Error)
    28: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/puma-3.12.1/lib/puma/thread_pool.rb:135:in `block in spawn_thread'
    27: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/puma-3.12.1/lib/puma/server.rb:334:in `block in run'
    26: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/puma-3.12.1/lib/puma/server.rb:474:in `process_client'
    25: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/puma-3.12.1/lib/puma/server.rb:660:in `handle_request'
    24: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/puma-3.12.1/lib/puma/configuration.rb:227:in `call'
    23: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/railties-5.2.3/lib/rails/engine.rb:524:in `call'
    22: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/sentry-raven-2.9.0/lib/raven/integrations/rack.rb:51:in `call'
    21: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call'
    20: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/static.rb:127:in `call'
    19: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/executor.rb:14:in `call'
    18: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/rack-2.0.7/lib/rack/runtime.rb:22:in `call'
    17: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/rack-2.0.7/lib/rack/method_override.rb:22:in `call'
    16: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/request_id.rb:27:in `call'
    15: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/request_store-1.4.1/lib/request_store/middleware.rb:19:in `call'
    14: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
    13: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
    12: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/railties-5.2.3/lib/rails/rack/logger.rb:26:in `call'
    11: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:71:in `tagged'
    10: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:28:in `tagged'
     9: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:71:in `block in tagged'
     8: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/railties-5.2.3/lib/rails/rack/logger.rb:26:in `block in call'
     7: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/railties-5.2.3/lib/rails/rack/logger.rb:38:in `call_app'
     6: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/actionpack-5.2.3/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
     5: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `call'
     4: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `catch'
     3: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:30:in `block in call'
     2: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:134:in `call_app'
     1: from /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:137:in `rescue in call_app'
/home/er1604140/.rvm/gems/ruby-2.6.3@tfc/gems/web-console-3.7.0/lib/web_console/middleware.rb:137:in `throw': uncaught throw :app_exception (UncaughtThrowError)

If I copy override multi_currency_admin_settings.rb and set original as suggested, it give following error

↳ /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/bundler/gems/spree_admin_roles_and_access-b1fbacfc01df/app/models/spree/ability_decorator.rb:16
  Spree::Permission Load (0.3ms)  SELECT "spree_permissions".* FROM "spree_permissions" WHERE "spree_permissions"."id" = $1 ORDER BY "spree_permissions"."priority" ASC  [["id", 1]]
  ↳ /home/er1604140/.rvm/gems/ruby-2.6.3@tfc/bundler/gems/spree_admin_roles_and_access-b1fbacfc01df/app/models/spree/ability_decorator.rb:16
Deface: 2 overrides found for 'spree/admin/general_settings/edit'
Deface: 'add_favorite_products_per_page_configuration' matched 1 times with '#preferences fieldset .form-actions'
Deface: 'multiple-currency' matched 2 times with '.form-group'
Deface: [ERROR] The original source for 'multiple-currency' has changed, this override should be reviewed to ensure it's still valid.
Completed 500 Internal Server Error in 452ms (ActiveRecord: 128.1ms)
wilsoninvestmentsp commented 5 years ago

@AmitPatel-BoTreeConsulting , I faced the same issue and found that the issue is with wicked_pdf latest version. Here is the more details : https://github.com/mileszs/wicked_pdf/pull/574. Downgraded to tag 1.1.0 solved it.

amitpatelx commented 5 years ago

Awesome. It worked. Thanks :1st_place_medal: