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

MicroCMS catches everything #1

Open
schmijos opened this issue Oct 6, 2014 · 0 comments
Open

MicroCMS catches everything #1

schmijos opened this issue Oct 6, 2014 · 0 comments

Comments

@schmijos
Copy link
Member

schmijos commented Oct 6, 2014

Maybe MicroCMS should restrict possible slug paths to non-images and non-publics

Started GET "/favicon.ico" for 127.0.0.1 at 2014-10-06 11:22:34 +0200
Processing by SpreeMicrocms::PagesController#show_slug as */*
Parameters: {"slug"=>"favicon.ico"}
Spree::User Load (0.2ms)  SELECT  "spree_users".* FROM "spree_users"  WHERE "spree_users"."id" = 1  ORDER BY "spree_users"."id" ASC LIMIT 1
Spree::Store Load (0.1ms)  SELECT  "spree_stores".* FROM "spree_stores"  WHERE (url like '%localhost%')  ORDER BY "spree_stores"."id" ASC LIMIT 1
Spree::Store Load (0.1ms)  SELECT  "spree_stores".* FROM "spree_stores"  WHERE "spree_stores"."default" = 't'  ORDER BY "spree_stores"."id" ASC LIMIT 1
Spree::Order Load (0.1ms)  SELECT  "spree_orders".* FROM "spree_orders"  WHERE "spree_orders"."completed_at" IS NULL AND "spree_orders"."currency" = 'CHF' AND "spree_orders"."guest_token" = '5VotuKCd4aGp11mbSPXbvQ' AND "spree_orders"."user_id" = 1 LIMIT 1
Spree::Order Load (0.1ms)  SELECT  "spree_orders".* FROM "spree_orders"  WHERE "spree_orders"."completed_at" IS NULL AND "spree_orders"."currency" = 'CHF' AND "spree_orders"."user_id" = 1  ORDER BY id DESC LIMIT 1
SpreeMicrocms::Page Load (0.2ms)  SELECT  "spree_microcms_pages".* FROM "spree_microcms_pages"   ORDER BY updated_at DESC LIMIT 1
Completed 500 Internal Server Error in 12ms

NoMethodError - undefined method `updated_at' for nil:NilClass:
   () Users/josua/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree_microcms-da833f959508/lib/spree_microcms.rb:26:in `get_key_base'
   () Users/josua/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree_microcms-da833f959508/lib/spree_microcms.rb:15:in `page_by_slug'
() Users/josua/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree_microcms-da833f959508/app/controllers/spree_microcms/pages_controller.rb:18:in `show_slug'
  actionpack (4.1.5) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (4.1.5) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.1.5) lib/action_controller/metal/rendering.rb:10:in `process_action'
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