狂欢0.70.3轨道3.1.3问题与分类

时间:2011-11-28 20:48:58

标签: ruby-on-rails ruby-on-rails-3 spree

在rails 3.1.3上运行狂欢0.70.3

我通过管理员创建了一个新的分类树,然后我在产品上添加了一个分类。 新的分类实际上它确实显示在侧边栏但是当试图访问我得到404不存在。

Started GET "/t/organa-metrisis/mikrometra" for 127.0.0.1 at 2011-11-28 22:44:33 +0200
  Property Load (0.2ms)  SELECT "properties".* FROM "properties" WHERE "properties"."name" = 'brand' LIMIT 1
  Processing by TaxonsController#show as HTML
  Parameters: {"id"=>"organa-metrisis/mikrometra"}
  AppConfiguration Load (0.3ms)  SELECT "configurations".* FROM "configurations" WHERE "configurations"."type" IN ('AppConfiguration') AND "configurations"."name" = 'Default configuration' LIMIT 1
  User Load (0.3ms)  SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
  Taxon Load (0.3ms)  SELECT "taxons".* FROM "taxons" WHERE "taxons"."permalink" = 'organa-metrisis/mikrometra' LIMIT 1
Rendered public/404.html (116.9ms)
Completed 404 Not Found in 364ms (Views: 217.9ms | ActiveRecord: 2.3ms)

1 个答案:

答案 0 :(得分:0)

我目前正在运行相同的环境和rails,但我的输出不同,并且工作正常。我建议您重新创建分类,然后在产品上重新分配您的分类。 “views / shared”中的 _taxonomies.html.erb 视图可能存在问题。

这是我的示例输出(顶级有4个分类,一个分类的第二级有8个分类):

Started GET "/t/cards/congratulations" for 127.0.0.1 at 2011-12-18 22:11:26 -0500
  Property Load (0.1ms)  SELECT "properties".* FROM "properties" WHERE "properties"."name" = 'brand' LIMIT 1
  Processing by TaxonsController#show as HTML
  Parameters: {"id"=>"cards/congratulations"}
  User Load (0.3ms)  SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
  Taxon Load (0.4ms)  SELECT "taxons".* FROM "taxons" WHERE "taxons"."permalink" = 'cards/congratulations' LIMIT 1
  Taxon Load (0.3ms)  SELECT "taxons".* FROM "taxons" WHERE "taxons"."id" = ? LIMIT 1  [["id", 8]]
  Taxon Load (0.3ms)  SELECT "taxons".* FROM "taxons" WHERE ("taxons"."lft" >= 8 AND "taxons"."rgt" <= 9) ORDER BY "taxons"."lft"
  Taxonomy Load (0.2ms)  SELECT "taxonomies".* FROM "taxonomies" INNER JOIN "taxons" ON "taxons"."taxonomy_id" = "taxonomies"."id" AND "taxons"."parent_id" IS NULL
Taxon Load (0.3ms)  SELECT "taxons".* FROM "taxons" WHERE "taxons"."taxonomy_id" IN (1, 2, 3, 4) AND ("taxons"."parent_id" IS NULL)
  Taxon Load (0.4ms)  SELECT "taxons".* FROM "taxons" WHERE "taxons"."parent_id" IN (1, 2, 3, 4) ORDER BY "lft"
  Taxon Load (0.4ms)  SELECT "taxons".* FROM "taxons" WHERE ("taxons"."lft" <= 8 AND "taxons"."rgt" >= 9) ORDER BY "taxons"."lft"
  CACHE (0.0ms)  SELECT "taxons".* FROM "taxons" WHERE ("taxons"."lft" <= 8 AND "taxons"."rgt" >= 9) ORDER BY "taxons"."lft"
  CACHE (0.0ms)  SELECT "taxons".* FROM "taxons" WHERE ("taxons"."lft" <= 8 AND "taxons"."rgt" >= 9) ORDER BY "taxons"."lft"
  CACHE (0.0ms)  SELECT "taxons".* FROM "taxons" WHERE ("taxons"."lft" <= 8 AND "taxons"."rgt" >= 9) ORDER BY "taxons"."lft"
  CACHE (0.0ms)  SELECT "taxons".* FROM "taxons" WHERE ("taxons"."lft" <= 8 AND "taxons"."rgt" >= 9) ORDER BY "taxons"."lft"
  CACHE (0.0ms)  SELECT "taxons".* FROM "taxons" WHERE ("taxons"."lft" <= 8 AND "taxons"."rgt" >= 9) ORDER BY "taxons"."lft"
  CACHE (0.0ms)  SELECT "taxons".* FROM "taxons" WHERE ("taxons"."lft" <= 8 AND "taxons"."rgt" >= 9) ORDER BY "taxons"."lft"
  CACHE (0.0ms)  SELECT "taxons".* FROM "taxons" WHERE ("taxons"."lft" <= 8 AND "taxons"."rgt" >= 9) ORDER BY "taxons"."lft"
  CACHE (0.0ms)  SELECT "taxons".* FROM "taxons" WHERE ("taxons"."lft" <= 8 AND "taxons"."rgt" >= 9) ORDER BY "taxons"."lft"
Rendered spree_dodatest_theme/app/views/shared/_taxonomies.html.erb (140.1ms)

......(它继续)