I have a page in German name as 'kontakt', but the access is with /contact. I start to fiy this bug, thinking in the translations and I did changes in:
(controller) inquiries-controller.rb: changing
def find_page
@page = ::Refinery::Page.find_by_link_url("/kontakt")
end
The i18n.rb:
config.enabled = true
config.default_locale = :de
config.current_locale = :de
config.default_frontend_locale = :de
config.frontend_locales = [:en, :de]
config.locales = { :en => 'English', :de => 'Deutsch' }
I changed in (model)setting.rb:
def confirmation_subject(locale="de")...
instead of 'en'.
I changed the redirection in refinerycms to /kontakt.
I get the error ' The page isn't redirecting properly' in the browser.
The console:
Started GET "/kontakt" for 127.0.0.1 at 2013-02-19 17:07:27 +0100 Processing by Refinery::PagesController#show as HTML Parameters: {"path"=>"kontakt", "locale"=>:de} Refinery::Role Load (0.2ms) SELECT "refinery_roles".* FROM "refinery_roles" WHERE "refinery_roles"."title" = 'Refinery' LIMIT 1 Refinery::User Load (0.2ms) SELECT "refinery_users".* FROM "refinery_users" INNER JOIN "refinery_roles_users" ON "refinery_users"."id" = "refinery_roles_users"."user_id" WHERE "refinery_roles_users"."role_id" = 1 Refinery::Page Load (0.4ms) SELECT "refinery_pages".* FROM "refinery_pages" INNER JOIN "refinery_page_translations" ON "refinery_page_translations"."refinery_page_id" = "refinery_pages"."id" WHERE "refinery_page_translations"."locale" IN ('en', 'de') AND "refinery_page_translations"."slug" = 'kontakt' AND "refinery_pages"."parent_id" IS NULL LIMIT 1 Redirected to ../kontakt Refinery::User Load (0.1ms) SELECT "refinery_users".* FROM "refinery_users" WHERE "refinery_users"."id" = 3 LIMIT 1 Refinery::Role Load (0.1ms) SELECT "refinery_roles".* FROM "refinery_roles" INNER JOIN "refinery_roles_users" ON "refinery_roles"."id" = "refinery_roles_users"."role_id" WHERE "refinery_roles_users"."user_id" = 3 Completed 302 Found in 8ms (ActiveRecord: 1.1ms) cache: [GET /kontakt] miss cache: [GET /kontakt] miss
The log of development.log:
Started GET "/kontakt" for 127.0.0.1 at 2013-02-19 17:07:27 +0100 Processing by Refinery::PagesController#show as HTML Parameters: {"path"=>"kontakt", "locale"=>:de} [1m[35mRefinery::Role Load (0.1ms)[0m SELECT "refinery_roles".* FROM "refinery_roles" WHERE "refinery_roles"."title" = 'Refinery' LIMIT 1
[1m[36mRefinery::User Load (0.2ms)[0m [1mSELECT "refinery_users".* FROM "refinery_users" INNER JOIN "refinery_roles_users" ON "refinery_users"."id" = "refinery_roles_users"."user_id" WHERE "refinery_roles_users"."role_id" = 1[0m [1m[35mRefinery::Page Load (0.2ms)[0m SELECT "refinery_pages".* FROM "refinery_pages" INNER JOIN "refinery_page_translations" ON "refinery_page_translations"."refinery_page_id" = "refinery_pages"."id" WHERE "refinery_page_translations"."locale" IN ('en', 'de') AND "refinery_page_translations"."slug" = 'kontakt' AND "refinery_pages"."parent_id" IS NULL LIMIT 1 Redirected to //../kontakt [1m[36mRefinery::User Load (0.1ms)[0m [1mSELECT "refinery_users".* FROM "refinery_users" WHERE "refinery_users"."id" = 3 LIMIT 1[0m [1m[35mRefinery::Role Load (0.1ms)[0m SELECT "refinery_roles".* FROM "refinery_roles" INNER JOIN "refinery_roles_users" ON "refinery_roles"."id" = "refinery_roles_users"."role_id" WHERE "refinery_roles_users"."user_id" = 3 Completed 302 Found in 6ms (ActiveRecord: 0.8ms)
I have the translations in the files: en.yml and de.yml
I have seen the information in http://refinerycms.com/edge-guides/translate-refinery but I could not find a solution.
If I try to enter with /contact, works good, even with all of the changes.
Also, in the formular of the page, the validation is reading a value in english.