refinery / refinerycms-news

News Plugin for Refinery CMS
http://www.refinerycms.com
MIT License
121 stars 120 forks source link

i18n / news routing problems #110

Closed markoh closed 12 years ago

markoh commented 12 years ago

Hello

I have problems using news engine with refinerycms. if I go to http://localhost:3000/news - then i get error No route matches {:locale=>:sl, :controller=>"refinery/news/items"}

This error also appears if I create custom engine with "config.frontend_locales = [:sl, :en]". I google for this problem and I found also other have the same problems ... but no solution so far.

Refinery::I18n.configure do |config| config.enabled = true config.default_locale = :sl config.current_locale = :sl config.default_frontend_locale = :sl config.frontend_locales = [:sl, :en] end

The problem is also described here https://groups.google.com/forum/?fromgroups#!topic/refinery-cms/wgvjK34K6Zo

Can someone spot the problem?

Thanx in advance Marko

ugisozols commented 12 years ago

I can't reproduce this problem on vanilla refinery 2.0 app.

Do you have your own links which link to refinery extensions like news in your case?

markoh commented 12 years ago

Hey, i use latest 2.0.5 version, and dont use any own links.

First create Refinery::I18n.configure do |config| with multiple config.frontend_locales. Then try to create new engine (news or define your own). The engine is created and added to menu and admin. But when you want to access it in front end menu ... you get error - No route matches {:locale=>:sl, :controller=>"refinery/news/items"}.

markoh commented 12 years ago

ugisozols find the problem in my code ...

In _header I had link <%= link_to "SomeLink" %> and because I didnt pass second parameter in link_to helper ... all this troubles starts.

thanx for helping me