#4 ✓resolved
Kieran P

Changing Topic Type error

Reported by Kieran P | July 28th, 2008 @ 09:57 AM | in 1.1

When you add a topic type, it works fine, but after editing something and hitting submit, you get the following ArgumentError:

ArgumentError in Topic typesController#update

ArgumentError (wrong number of arguments (3 for 2)):

/vendor/rails/activerecord/lib/active_record/base.rb:2479:in `attributes_with_quotes'

/vendor/rails/activerecord/lib/active_record/base.rb:2479:in `update_without_lock'

/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb:70:in `update_without_dirty'

/vendor/rails/activerecord/lib/active_record/dirty.rb:137:in `update_without_callbacks'

/vendor/rails/activerecord/lib/active_record/callbacks.rb:234:in `update_without_timestamps'

/vendor/rails/activerecord/lib/active_record/timestamp.rb:38:in `update'

/vendor/rails/activerecord/lib/active_record/base.rb:2472:in `create_or_update_without_callbacks'

/vendor/rails/activerecord/lib/active_record/callbacks.rb:207:in `create_or_update'

/vendor/rails/activerecord/lib/active_record/base.rb:2200:in `save_without_validation'

/vendor/rails/activerecord/lib/active_record/validations.rb:901:in `save_without_dirty'

/vendor/rails/activerecord/lib/active_record/dirty.rb:75:in `save_without_transactions'

/vendor/rails/activerecord/lib/active_record/transactions.rb:106:in `save_without_unsaved_flag'

/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'

/vendor/rails/activerecord/lib/active_record/transactions.rb:79:in `transaction'

/vendor/rails/activerecord/lib/active_record/transactions.rb:98:in `transaction'

/vendor/rails/activerecord/lib/active_record/transactions.rb:106:in `save_without_unsaved_flag'

/vendor/rails/activerecord/lib/active_record/transactions.rb:118:in `rollback_active_record_state!'

/vendor/rails/activerecord/lib/active_record/transactions.rb:106:in `save_without_unsaved_flag'

/vendor/plugins/active_scaffold/lib/extensions/unsaved_record.rb:15:in `save'

/vendor/rails/activerecord/lib/active_record/base.rb:2262:in `update_attributes'

/app/controllers/topic_types_controller.rb:46:in `update'

Parameters:

{"commit"=>"Edit",

"authenticity_token"=>"4552d16d54744613e0e8da77ca635ac248f54395",

"id"=>"7",

"urlified_name"=>"site",

"topic_type"=>{"name"=>"Test1",

"description"=>"test1"}}

Comments and changes to this ticket

  • Walter McGinnis

    Walter McGinnis July 28th, 2008 @ 10:00 AM

    You may want to check editing of content types as well. Most likely

    shares the same problem.

    Cheers,

    Walter

    On Jul 28, 2008, at 9:50 AM, Lighthouse wrote:

  • James

    James July 28th, 2008 @ 10:07 AM

    This problem is most likely related to dirty attributes in Rails 2.1. I (James) will look into this and report back.

  • Kieran P

    Kieran P July 28th, 2008 @ 10:12 AM

    The add and editing on Content types is disabled (commented out) because they are not things you should edit. The Topic types is the only place I get this type of error.

  • Kieran P

    Kieran P July 30th, 2008 @ 03:07 PM

    • Assigned user changed from “Kete” to “James”
    • Milestone set to 1.1
  • Kieran P

    Kieran P August 4th, 2008 @ 01:51 PM

    I found a similar issue on the old development.kete site, reported by Joe (atz). It was marked fixed in 1.0 and pulled to trunk. I found this commit which shows how it was fixed back then: http://github.com/kete/kete/comm...

    Perhaps betternestedset is not compatible with Rails 2.1?

  • Kieran P

    Kieran P August 4th, 2008 @ 01:57 PM

    Furthermore, it looks like there is a commit that fixes this issue.

    http://github.com/chris/better_n...

    I'm going to try a local update, see if it fixes things.

  • Kieran P

    Kieran P August 4th, 2008 @ 02:12 PM

    • Assigned user changed from “James” to “Kieran P”
    • State changed from “new” to “resolved”

    Great! The updated better_nested_set on github fixed this issue with what looks like no side effects. Add/edit of topic types work perfectly error free.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Kete was developed by Horowhenua Library Trust and Katipo Communications Ltd. to build a digital library of Horowhenua material.

People watching this ticket

Pages