0

在轨道 3.1.3 上运行 spree 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)
4

1 回答 1

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)

...(继续)

于 2011-12-19T03:18:04.600 回答