Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

add_store_menu_to_top_header attempts to use the partial spree/shared/store_menu, but this file does not exist in spree core (1.2.0) #7

Open
pavgup opened this issue Sep 16, 2012 · 3 comments

Comments

@pavgup
Copy link

pavgup commented Sep 16, 2012

And deface spits back a nasty error:

ActionView::Template::Error (Missing partial spree/shared/store_menu with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee, :rabl]}. Searched in:

  • "/app/app/views"
    2012-09-16T22:27:25+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/bundler/gems/spree_auth_devise-99e8efaaf47d/app/views"
    2012-09-16T22:27:25+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/devise-2.0.4/app/views"
    2012-09-16T22:27:25+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/spree_skrill-1.0.2/app/views"
    2012-09-16T22:27:25+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/spree_promo-1.2.0/app/views"
    2012-09-16T22:27:25+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/spree_dash-1.2.0/app/views"
    2012-09-16T22:27:25+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/spree_api-1.2.0/app/views"
    2012-09-16T22:27:25+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/spree_core-1.2.0/app/views"
    2012-09-16T22:27:25+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/kaminari-0.14.1/app/views"

Maybe I'm doing something wrong, but I think this is a change in the the way 1.2.0 is structured which breaks this theme.

@pavgup
Copy link
Author

pavgup commented Sep 16, 2012

As a quick note, you can get your app working again (although poorly, naturally) by changing the partial in your add_store_menu_to_top_header.rb to spree/shared/main_nav_bar.

@sadfuzzy
Copy link

+1

@TylerRick
Copy link

It looks like the contents of that partial were simply moved inside of core/app/views/spree/shared/_main_nav_bar.html.erb by this commit:

git log -p -- ./core/app/views/spree/shared/_main_nav_bar.html.erb core/app/views/spree/shared/_store_menu.html.erb

commit 02a5d68e834b4c2429c94425f1826ca8c276df6d
Author: Kurtis Rainbolt-Greene <[email protected]>
Date:   Fri Apr 6 11:22:23 2012 -0500

    Refactor layout templates

    Merges #1361
---
 core/app/views/spree/shared/_main_nav_bar.html.erb |    6 ++++++
 core/app/views/spree/shared/_store_menu.html.erb   |    2 --
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git core/app/views/spree/shared/_main_nav_bar.html.erb core/app/views/spree/shared/_main_nav_bar.html.erb
new file mode 100644
index 0000000..0ad1726
--- /dev/null
+++ core/app/views/spree/shared/_main_nav_bar.html.erb
@@ -0,0 +1,6 @@
+<nav class="columns alpha omega sixteen">
+  <ul id="main-nav-bar" class="inline" data-hook>
+    <li id="home-link" data-hook><%= link_to t(:home), root_path %></li>
+    <li id="link-to-cart" data-hook><%= link_to_cart %></li>
+  </ul>
+</nav>
diff --git core/app/views/spree/shared/_store_menu.html.erb core/app/views/spree/shared/_store_menu.html.erb
deleted file mode 100644
index 2150de7..0000000
--- core/app/views/spree/shared/_store_menu.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-<li id="home-link" data-hook><%= link_to t(:home), root_path %></li>
-<li id="link-to-cart" data-hook><%= link_to_cart %></li>

Should be easy to fix it as proposed here in #9: https://github.com/spree/spree_blue_theme/pull/9/files

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants