Bug on the edit with radiant 0.6.1

Hi,

since I’ve upgraded rubyfrance.org with radiant 0.6.1 I can’t edit &
save a
text, because of this bug :

Processing PageController#edit (for 86.67.45.158 at 2007-06-17 13:23:36)
[POST]
Session ID: 0fc398e12928ecc2f4e21afeb371c24c
Parameters: {“commit”=>“Save Changes”, “part”=>{“0”=>{“name”=>“body”,
“filter_id”=>"", “content”=>“h1. Utilisation de Ruby dans des
entreprises en
France\r\n\r\nh2. Mandriva\r\n\r\nMandriva, société
française éditrice de la distribution GNU/Linux Mandriva Linux a développé\r\nle
logiciel Pulse:http://www.mandriva.com/fr/enterprise/products/pulse, un
outil de gestion de parc d’ordinateurs Linux/Windows (à comp
léter)\r\n\r\n\r\n\r\nTEST”}, “1”=>{“name”=>“extended”, “filter_id”=>"",
“content”=>""}}, “action”=>“edit”, “id”=>“216”,
“controller”=>“admin/page”,
“page”=>{“slug”=>“entreprises”, “class_name”=>“Page”, “tit
le”=>“Entreprises”, “breadcrumb”=>“Entreprises”, “lock_version”=>"",
“status_id”=>“1”, “layout_id”=>""}}

NoMethodError (undefined method +' for nil:NilClass): /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb:64:inupdate_without_callbacks’
/usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/callbacks.rb:267:in
update_without_timestamps' /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/timestamp.rb:48:inupdate’
/usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/base.rb:1789:in
create_or_update_without_callbacks' /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/callbacks.rb:242:increate_or_update’
/usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/base.rb:1545:in
save_without_validation' /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/validations.rb:752:insave_without_transactions’
/usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/transactions.rb:129:in
save' /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:59:intransaction’
/usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/transactions.rb:95:in
transaction' /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/transactions.rb:121:intransaction’
/usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activerecord/lib/active_record/transactions.rb:129:in
save' /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/app/controllers/admin/page_controller.rb:110:insave’
/usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/app/controllers/admin/abstract_model_controller.rb:116:in
handle_new_or_edit_post' /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/app/controllers/admin/page_controller.rb:25:inedit’

Frederic,

Did you run rake db:migrate when upgrading? 0.6 added optimistic
locking to pages, and it looks like the field responsible for that is
nil in your POST. It might fail if that column does not exist in the
database.

Sean

2007/6/17, Sean C. :

Frederic,

Did you run rake db:migrate when upgrading? 0.6 added optimistic
locking to pages, and it looks like the field responsible for that is
nil in your POST. It might fail if that column does not exist in the
database.

That’s right, it seems that the default value 0 in the lock_version
field
was not set when I had migrated db…
Now it works better, thanks.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs