spree-contrib / spree_blue_theme

Original Spree Blue theme (0.60.x)
BSD 3-Clause "New" or "Revised" License
64 stars 65 forks source link

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 12 years ago

pavgup commented 12 years ago

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:

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 commented 12 years ago

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 commented 12 years ago

+1

TylerRick commented 11 years ago

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 <kurtis.rainboltgreene@susco.net>
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