Problem posting new article after update to 1343

I just upgraded my Typo installation last night to HEAD (rev 1343),
and when I’m trying to post a new article through the web interface,
I get this:

ActiveRecord::HasManyThroughCantAssociateNewRecords (Cannot associate
new record
s through ‘Article#notifications’ on ‘#’. Both records must have an
id in order
to create the has_many :through record associating them.):
/vendor/rails/activerecord/lib/active_record/associations/
has_many_through_association.rb:52:in <<' /app/models/article.rb:271:inadd_notifications’
/vendor/rails/activerecord/lib/active_record/callbacks.rb:333:in
send' /vendor/rails/activerecord/lib/active_record/callbacks.rb:333:incallback’
/vendor/rails/activerecord/lib/active_record/callbacks.rb:330:in
each' /vendor/rails/activerecord/lib/active_record/callbacks.rb:330:incallback’
/vendor/rails/activerecord/lib/active_record/callbacks.rb:253:in
create_without_timestamps' /vendor/rails/activerecord/lib/active_record/timestamp.rb:39:increate’
/vendor/rails/activerecord/lib/active_record/base.rb:1777:in
create_or_update_without_callbacks' /vendor/rails/activerecord/lib/active_record/callbacks.rb:242:increate_or_update’
/vendor/rails/activerecord/lib/active_record/base.rb:1533:in
save_without_validation' /vendor/rails/activerecord/lib/active_record/validations.rb: 752:insave_without_transactions’
/vendor/rails/activerecord/lib/active_record/transactions.rb:
129:in save' /vendor/rails/activerecord/lib/active_record/connection_adapters/ abstract/database_statements.rb:59:intransaction’
/vendor/rails/activerecord/lib/active_record/transactions.rb:
95:in transaction' /vendor/rails/activerecord/lib/active_record/transactions.rb: 121:intransaction’

[…]

Any thoughts?

Anyone? Bueller? Am I the only one who can’t make a post?

–Wade

“H. Wade M.” [email protected] writes:

Anyone? Bueller? Am I the only one who can’t make a post?

Sorry, I’ve been tied up with other stuff (and I’m going to be so tied
for at least the rest of today). I shall try and take a look tonight.

“H. Wade M.” [email protected] writes:

Anyone? Bueller? Am I the only one who can’t make a post?

–Wade

On Jan 8, 2007, at 1:08 PM, H. Wade M. wrote:

I just upgraded my Typo installation last night to HEAD (rev 1343),
and when I’m trying to post a new article through the web interface,
I get this:

Okay, I’ve moved the ‘add_notifications’ callback to be run by the
after_create hook instead of before_create, which should fix the
issue. Could you try it and let me know?

Sorry for the delay.

“H. Wade M.” [email protected] writes:

I just upgraded my Typo installation last night to HEAD (rev 1343),
didn’t show up. There was also an exception thrown:

ActiveRecord::RecordNotFound (Couldn’t find all Categories with IDs
(2,0)):

Weird - I could have sworn we had tested that categories and stuff
worked.

I shall look further into it.

On Jan 11, 2007, at 2:18 AM, Piers C. wrote:

I get this:

Okay, I’ve moved the ‘add_notifications’ callback to be run by the
after_create hook instead of before_create, which should fix the
issue. Could you try it and let me know?

Sorry for the delay.

The article got published on the site, but the category I picked
didn’t show up. There was also an exception thrown:

ActiveRecord::RecordNotFound (Couldn’t find all Categories with IDs
(2,0)):
/vendor/rails/activerecord/lib/active_record/base.rb:1042:in
find_some' /vendor/rails/activerecord/lib/active_record/base.rb:1014:infind_from_ids’
/vendor/rails/activerecord/lib/active_record/base.rb:416:in find' /app/models/category.rb:22:infind’
/vendor/rails/activerecord/lib/active_record/base.rb:943:in
with_scope' /app/models/category.rb:21:infind’
/app/controllers/admin/content_controller.rb:140:in
set_article_categories' /app/controllers/admin/content_controller.rb:105:innew_or_edit’
/app/controllers/admin/content_controller.rb:25:in new' /vendor/rails/actionpack/lib/action_controller/base.rb:1092:insend’
/vendor/rails/actionpack/lib/action_controller/base.rb:1092:in
perform_acti on_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:632:incall_filte
r’

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