resolve/refinerycms — Issue #1302: Nested pages lose slugs on save
Author: bitflut
Created: 2012-02-17 15:03:36+00:00
State: open

Hello everyone,

whenever I save a **nested** page, its slug gets deleted and not regenerated again.

This is my configuration on a new refinery edge install:

refinery/i18n.rb:

```ruby
Refinery::I18n.configure do |config|
config.enabled = false
config.default_locale = :de
config.current_locale = :de
config.default_frontend_locale = :de
config.frontend_locales = [:de]
config.locales = {:de=>"Deutsch"}
end
```

refinery/pages.rb:

```ruby
Refinery::Pages.configure do |config|
config.approximate_ascii = true
config.strip_non_ascii = true
end
```

My application.rb file has this

```ruby
config.i18n.default_locale = :de
```

At the moment I'm using this function as after_save on ::Refinery::Page as a temporary fix:

```ruby
def ensure_slug
create_slug!(:name => custom_slug_or_title.parameterize) unless slug?
end
```

Any clue why this happens?