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

Error 500 when loading the admin layout in solidus 2.4.0.rc1 #12

Closed
afdev82 opened this issue Nov 7, 2017 · 1 comment
Closed

Error 500 when loading the admin layout in solidus 2.4.0.rc1 #12

afdev82 opened this issue Nov 7, 2017 · 1 comment

Comments

@afdev82
Copy link
Contributor

afdev82 commented Nov 7, 2017

I found a problem when using this gem in solidus 2.4.0.rc1.
I think Deface generates the wrong code for this override: https://github.com/solidusio-contrib/solidus_editor/blob/master/app/overrides/include_rich_text_js.rb

This is the deface debug:

---------------- Before ----------------
<!doctype html>
<html lang="<%= I18n.locale %>">
  <head data-hook="admin_inside_head">
    <%= render 'spree/admin/shared/head' %>
  </head>

  <body class="admin">
    <%= render "spree/admin/shared/navigation" %>
    <%= render "spree/admin/shared/header" %>
    <%= render "spree/admin/shared/flash" %>
    <%= render "spree/admin/shared/spinner" %>

    <div class="content-wrapper <%= @admin_layout.presence %> <%= "has-sidebar" if content_for?(:sidebar) %> <%= "has-tabs" if content_for?(:tabs) %>" id="wrapper" data-hook>
      <div class="content row">
        <div class="content-main col-<%= content_for?(:sidebar) ? '9' : '12' %>">
          <%= yield :tabs %>
          <%= render "spree/admin/shared/table_filter" %>
          <%= yield %>
        </div>

        <%= render "spree/admin/shared/sidebar" %>
      </div>
    </div>

    <div data-hook="admin_footer_scripts"></div>
  </body>
</html>

---------------- Overrides (1)--------
- 'include_rich_text_js' will be applied.

---------------- After ----------------
/home/antonio/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/nokogiri-1.6.8.1/lib/nokogiri/html/document.rb:164: warning: constant ::Fixnum is deprecated
<!DOCTYPE html>
<html lang="<%= I18n.locale %>">
  <head data-hook="admin_inside_head">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <%= render 'spree/admin/shared/head' %>
  </head>

  <body class="admin">
    <%= render "spree/admin/shared/navigation" %>
    <%= render "spree/admin/shared/header" %>
    <%= render "spree/admin/shared/flash" %>
    <%= render "spree/admin/shared/spinner" %>

    <div class='content-wrapper <%= @admin_layout.presence %> <%= "has-sidebar" if content_for?(:sidebar) %> <%= ' has-tabs if content_for>" id="wrapper" data-hook>
      <div class="content row">
        <div class="content-main col-<%= content_for?(:sidebar) ? '9' : '12' %>">
          <%= yield :tabs %>
          <%= render "spree/admin/shared/table_filter" %>
          <%= yield %>
        </div>

        <%= render "spree/admin/shared/sidebar" %>
      </div>
    </div>

    <div data-hook="admin_footer_scripts"><%= render partial: "shared/rich_editor_javascript" %></div>
  </body>
</html>

This is the complete stack trace:

SyntaxError (/home/antonio/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/solidus_backend-2.4.0.rc1/app/views/spree/layouts/admin.html.erb:16: syntax error, unexpected tINTEGER, expecting ')'
%= content_for?(:sidebar) ? '9' : '12' );@output_buffer.safe
                              ^
/home/antonio/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/solidus_backend-2.4.0.rc1/app/views/spree/layouts/admin.html.erb:16: syntax error, unexpected tINTEGER, expecting ')'
ent_for?(:sidebar) ? '9' : '12' );@output_buffer.safe_append
                              ^
/home/antonio/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/solidus_backend-2.4.0.rc1/app/views/spree/layouts/admin.html.erb:18: syntax error, unexpected tIDENTIFIER, expecting ')'
_buffer.append=( render "spree/admin/shared/table_filter" );
                              ^
/home/antonio/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/solidus_backend-2.4.0.rc1/app/views/spree/layouts/admin.html.erb:18: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
ree/admin/shared/table_filter" );@output_buffer.safe_append=
                              ^
/home/antonio/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/solidus_backend-2.4.0.rc1/app/views/spree/layouts/admin.html.erb:22: syntax error, unexpected tIDENTIFIER, expecting ')'
_buffer.append=( render "spree/admin/shared/sidebar" );@outp
                              ^
/home/antonio/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/solidus_backend-2.4.0.rc1/app/views/spree/layouts/admin.html.erb:22: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
r "spree/admin/shared/sidebar" );@output_buffer.safe_append=
                              ^
/home/antonio/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/solidus_backend-2.4.0.rc1/app/views/spree/layouts/admin.html.erb:26: syntax error, unexpected tIDENTIFIER, expecting ')'
ata-hook="admin_footer_scripts">'.freeze;@output_buffer.appe
                              ^
/home/antonio/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/solidus_backend-2.4.0.rc1/app/views/spree/layouts/admin.html.erb:26: syntax error, unexpected tIDENTIFIER, expecting ')'
pend=( render partial: "shared/rich_editor_javascript" );@ou
                              ^
/home/antonio/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/solidus_backend-2.4.0.rc1/app/views/spree/layouts/admin.html.erb:26: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
shared/rich_editor_javascript" );@output_buffer.safe_append=
                              ^
/home/antonio/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/solidus_backend-2.4.0.rc1/app/views/spree/layouts/admin.html.erb:26: unterminated string meets end of file):
  
solidus_backend (2.4.0.rc1) app/views/spree/layouts/admin.html.erb:16: syntax error, unexpected tINTEGER, expecting ')'
%= content_for?(:sidebar) ? '9' : '12' );@output_buffer.safe
                              ^
solidus_backend (2.4.0.rc1) app/views/spree/layouts/admin.html.erb:16: syntax error, unexpected tINTEGER, expecting ')'
ent_for?(:sidebar) ? '9' : '12' );@output_buffer.safe_append
                              ^
solidus_backend (2.4.0.rc1) app/views/spree/layouts/admin.html.erb:18: syntax error, unexpected tIDENTIFIER, expecting ')'
_buffer.append=( render "spree/admin/shared/table_filter" );
                              ^
solidus_backend (2.4.0.rc1) app/views/spree/layouts/admin.html.erb:18: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
ree/admin/shared/table_filter" );@output_buffer.safe_append=
                              ^
solidus_backend (2.4.0.rc1) app/views/spree/layouts/admin.html.erb:22: syntax error, unexpected tIDENTIFIER, expecting ')'
_buffer.append=( render "spree/admin/shared/sidebar" );@outp
                              ^
solidus_backend (2.4.0.rc1) app/views/spree/layouts/admin.html.erb:22: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
r "spree/admin/shared/sidebar" );@output_buffer.safe_append=
                              ^
solidus_backend (2.4.0.rc1) app/views/spree/layouts/admin.html.erb:26: syntax error, unexpected tIDENTIFIER, expecting ')'
ata-hook="admin_footer_scripts">'.freeze;@output_buffer.appe
                              ^
solidus_backend (2.4.0.rc1) app/views/spree/layouts/admin.html.erb:26: syntax error, unexpected tIDENTIFIER, expecting ')'
pend=( render partial: "shared/rich_editor_javascript" );@ou
                              ^
solidus_backend (2.4.0.rc1) app/views/spree/layouts/admin.html.erb:26: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
shared/rich_editor_javascript" );@output_buffer.safe_append=
                              ^
solidus_backend (2.4.0.rc1) app/views/spree/layouts/admin.html.erb:26: unterminated string meets end of file
actionview (5.1.4) lib/action_view/template.rb:307:in `module_eval'
actionview (5.1.4) lib/action_view/template.rb:307:in `compile'
actionview (5.1.4) lib/action_view/template.rb:257:in `block (2 levels) in compile!'
activesupport (5.1.4) lib/active_support/notifications.rb:168:in `instrument'
actionview (5.1.4) lib/action_view/template.rb:348:in `instrument'
actionview (5.1.4) lib/action_view/template.rb:256:in `block in compile!'
actionview (5.1.4) lib/action_view/template.rb:244:in `synchronize'
actionview (5.1.4) lib/action_view/template.rb:244:in `compile!'
actionview (5.1.4) lib/action_view/template.rb:156:in `block in render'
activesupport (5.1.4) lib/active_support/notifications.rb:168:in `instrument'
actionview (5.1.4) lib/action_view/template.rb:352:in `instrument_render_template'
actionview (5.1.4) lib/action_view/template.rb:155:in `render'
deface (1.0.2) lib/deface/action_view_extensions.rb:41:in `render'
actionview (5.1.4) lib/action_view/renderer/template_renderer.rb:64:in `render_with_layout'
actionview (5.1.4) lib/action_view/renderer/template_renderer.rb:50:in `render_template'
actionview (5.1.4) lib/action_view/renderer/template_renderer.rb:14:in `render'
actionview (5.1.4) lib/action_view/renderer/renderer.rb:42:in `render_template'
actionview (5.1.4) lib/action_view/renderer/renderer.rb:23:in `render'
actionview (5.1.4) lib/action_view/rendering.rb:103:in `_render_template'
actionpack (5.1.4) lib/action_controller/metal/streaming.rb:217:in `_render_template'
actionview (5.1.4) lib/action_view/rendering.rb:83:in `render_to_body'
actionpack (5.1.4) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
actionpack (5.1.4) lib/action_controller/metal/renderers.rb:141:in `render_to_body'
actionpack (5.1.4) lib/abstract_controller/rendering.rb:24:in `render'
actionpack (5.1.4) lib/action_controller/metal/rendering.rb:36:in `render'
actionpack (5.1.4) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
activesupport (5.1.4) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/home/antonio/.rbenv/versions/2.4.2/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
activesupport (5.1.4) lib/active_support/core_ext/benchmark.rb:12:in `ms'
actionpack (5.1.4) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
actionpack (5.1.4) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
activerecord (5.1.4) lib/active_record/railties/controller_runtime.rb:29:in `cleanup_view_runtime'
actionpack (5.1.4) lib/action_controller/metal/instrumentation.rb:43:in `render'
actionpack (5.1.4) lib/action_controller/metal/implicit_render.rb:33:in `default_render'
actionpack (5.1.4) lib/action_controller/metal/basic_implicit_render.rb:4:in `block in send_action'
actionpack (5.1.4) lib/action_controller/metal/basic_implicit_render.rb:4:in `tap'
actionpack (5.1.4) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
actionpack (5.1.4) lib/abstract_controller/base.rb:186:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (5.1.4) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (5.1.4) lib/active_support/callbacks.rb:108:in `block in run_callbacks'
activesupport (5.1.4) lib/active_support/callbacks.rb:135:in `run_callbacks'
actionpack (5.1.4) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/rescue.rb:20:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (5.1.4) lib/active_support/notifications.rb:166:in `block in instrument'
activesupport (5.1.4) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.1.4) lib/active_support/notifications.rb:166:in `instrument'
actionpack (5.1.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
activerecord (5.1.4) lib/active_record/railties/controller_runtime.rb:22:in `process_action'
actionpack (5.1.4) lib/abstract_controller/base.rb:124:in `process'
actionview (5.1.4) lib/action_view/rendering.rb:30:in `process'
actionpack (5.1.4) lib/action_controller/metal.rb:189:in `dispatch'
actionpack (5.1.4) lib/action_controller/metal.rb:253:in `dispatch'
actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:31:in `serve'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `each'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `serve'
actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:834:in `call'
railties (5.1.4) lib/rails/engine.rb:522:in `call'
railties (5.1.4) lib/rails/railtie.rb:185:in `public_send'
railties (5.1.4) lib/rails/railtie.rb:185:in `method_missing'
actionpack (5.1.4) lib/action_dispatch/routing/mapper.rb:17:in `block in <class:Constraints>'
actionpack (5.1.4) lib/action_dispatch/routing/mapper.rb:46:in `serve'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `each'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `serve'
actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:834:in `call'
rack-attack (5.0.1) lib/rack/attack.rb:147:in `call'
omniauth (1.7.1) lib/omniauth/strategy.rb:190:in `call!'
omniauth (1.7.1) lib/omniauth/strategy.rb:168:in `call'
versioncake (3.3.0) lib/versioncake/rack/middleware.rb:17:in `call'
omniauth (1.7.1) lib/omniauth/strategy.rb:190:in `call!'
omniauth (1.7.1) lib/omniauth/strategy.rb:168:in `call'
omniauth (1.7.1) lib/omniauth/strategy.rb:190:in `call!'
omniauth (1.7.1) lib/omniauth/strategy.rb:168:in `call'
omniauth (1.7.1) lib/omniauth/builder.rb:63:in `call'
dragonfly (1.1.3) lib/dragonfly/middleware.rb:14:in `call'
bullet (5.6.1) lib/bullet/rack.rb:12:in `call'
warden (1.2.7) lib/warden/manager.rb:36:in `block in call'
warden (1.2.7) lib/warden/manager.rb:35:in `catch'
warden (1.2.7) lib/warden/manager.rb:35:in `call'
rack (2.0.3) lib/rack/etag.rb:25:in `call'
rack (2.0.3) lib/rack/conditional_get.rb:25:in `call'
rack (2.0.3) lib/rack/head.rb:12:in `call'
rack (2.0.3) lib/rack/session/abstract/id.rb:232:in `context'
rack (2.0.3) lib/rack/session/abstract/id.rb:226:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/cookies.rb:613:in `call'
activerecord (5.1.4) lib/active_record/migration.rb:556:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
activesupport (5.1.4) lib/active_support/callbacks.rb:97:in `run_callbacks'
actionpack (5.1.4) lib/action_dispatch/middleware/callbacks.rb:24:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.1.4) lib/rails/rack/logger.rb:24:in `call'
ahoy_matey (1.6.0) lib/ahoy/engine.rb:22:in `call_with_quiet_ahoy'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
request_store (1.3.2) lib/request_store/middleware.rb:9:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
rack (2.0.3) lib/rack/method_override.rb:22:in `call'
rack (2.0.3) lib/rack/runtime.rb:22:in `call'
activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
dragonfly (1.1.3) lib/dragonfly/cookie_monster.rb:9:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call'
rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
rack-cors (1.0.2) lib/rack/cors.rb:97:in `call'
railties (5.1.4) lib/rails/engine.rb:522:in `call'
puma (3.7.1) lib/puma/configuration.rb:232:in `call'
puma (3.7.1) lib/puma/server.rb:578:in `handle_request'
puma (3.7.1) lib/puma/server.rb:415:in `process_client'
puma (3.7.1) lib/puma/server.rb:275:in `block in run'
puma (3.7.1) lib/puma/thread_pool.rb:120:in `block in spawn_thread'

I'm trying to figure out what's wrong, but any help is appreciated :P

@afdev82 afdev82 changed the title 500 when load the admin layout in solidus 2.4.0.rc1 Error 500 when load the admin layout in solidus 2.4.0.rc1 Nov 7, 2017
@afdev82 afdev82 changed the title Error 500 when load the admin layout in solidus 2.4.0.rc1 Error 500 when loading the admin layout in solidus 2.4.0.rc1 Nov 7, 2017
@afdev82
Copy link
Contributor Author

afdev82 commented Nov 9, 2017

This is fixed now with solidusio/solidus@65dc1cc

@afdev82 afdev82 closed this as completed Nov 9, 2017
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