Well after clearing the database posts are working fine again. The
database was all out of whack from me deleting records but not
associated activities and such. Still having trouble with the
comments, but I think I should be able to work them out now that the
errors actually make some sense to me.
On Oct 1, 10:29 pm, jdutil <[EMAIL PROTECTED]> wrote:
> Yeah I have. I had copied over posts thinking it was related to my
> comment problems at one point but I delete it and am just using it
> from the plugin now. I will check out that other post though thanks
> for the reference.
>
> On Oct 1, 10:24 pm, Tibo <[EMAIL PROTECTED]> wrote:
>
> > Have you been overriding CE models in your application? This problem
> > looks like it is similar to the previous post "Can not override models
> > by copying them" in this group. Might be worth it to take a look at
> > the post.
>
> > On Oct 2, 9:59 am, jdutil <[EMAIL PROTECTED]> wrote:
>
> > > This error is occuring on the users/show as well. I am able to view
> > > the pages and then the second time I try to view the page this error
> > > causes it to explode. Then if I restart the server I can view the
> > > page again, and then on the second view it explodes again.
>
> > > On Oct 1, 9:53 pm, jdutil <[EMAIL PROTECTED]> wrote:
>
> > > > Well I found the majority of my problems being that the activity
> > > > tracking was all messed up. I am still having trouble with this error
> > > > since I am not sure what if anything I did to cause this... I havn't
> > > > been messing with posts at all...
>
> > > > NoMethodError in Base#site_index
>
> > > > Showing vendor/plugins/community_engine/app/views/posts/
> > > > _post.html.haml where line #3 raised:
>
> > > > undefined method `to_param' for #<User:0xb6bc05dc>
>
> > > > Extracted source (around line #3):
>
> > > > 1: .hentry
> > > > 2: %h4.entry-title{:id=>"post_#{ post.id}"}
> > > > 3: = link_to post.title, user_post_path(post.user, post), :rel =>
> > > > 'bookmark'
> > > > 4:
> > > > 5: .vcard.author
> > > > 6: %h5
>
> > > > Trace of template inclusion: /base/site_index.html.haml
>
> > > > RAILS_ROOT: /home/jdutil/bnl
> > > > Application Trace | Framework Trace | Full Trace
>
> > > > /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> > > > attribute_methods.rb:256:in `method_missing'
> > > > /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> > > > associations/association_proxy.rb:177:in `send'
> > > > /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> > > > associations/association_proxy.rb:177:in `method_missing'
> > > > (eval):2:in `user_post_path'
> > > > app/views/base/site_index.html.haml:11:in
> > > > `_run_plugin_47app47views47base47site_index46html46haml'
> > > > /usr/bin/mongrel_rails:19:in `load'
> > > > /usr/bin/mongrel_rails:19
>
> > > > On Sep 30, 9:55 am, "Bruno Bornsztein" <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > Some of the limitations on adding comments to other objects are
> > > > > hardcoded,
> > > > > and probably need to be refactored. For example, comment expects to
> > > > > have a
> > > > > recipient_id defined so it knows who to notify about the comment. If
> > > > > you
> > > > > create comments without recipient_ids, you'll have problems
> > > > > (actually, I
> > > > > don't even know how you could, since comment validates_presence_of
> > > > > :recipient)
>
> > > > > In the case of an Event, you can just assign the event.user as the
> > > > > comment.recipient. Be warned, though, that you'll need to ensure that
> > > > > other
> > > > > parts of the app (like comment notification, commentable_url in
> > > > > application.rb, and comment activity tracking) still work.
>
> > > > > Hopefully I'll get around to making this a bit easier shortly.
> > > > > Thanks,
> > > > > Bruno
>
> > > > > On Tue, Sep 30, 2008 at 7:28 AM, jdutil <[EMAIL PROTECTED]> wrote:
>
> > > > > > Basically wondering how anyone else has set up comments for things
> > > > > > other than user profiles and blog posts. There was another thread
> > > > > > where someone talked about adding comments to events, but it wasn't
> > > > > > very descriptive on what actually needed to be done. Basically just
> > > > > > said look at the user model for an example. I tried doing so and
> > > > > > had
> > > > > > things working briefly. Then I navigated to the profile page, and
> > > > > > realized there was now errors on that page, so I tried to fix them
> > > > > > but
> > > > > > I think I only made things worse. Now I am only able to post a
> > > > > > comment on event once and then if I try again it raises an error.
> > > > > > If
> > > > > > I restart the server it will then let me place 1 comment again
> > > > > > before
> > > > > > raising an error. So now I am looking to see if anyone else has
> > > > > > added
> > > > > > comments to events or any other custom model and wondering how they
> > > > > > did it.
>
> > > > > > I think my errors are because I am not assigning the recipient_id on
> > > > > > the comment record for the comments that aren't of the
> > > > > > commentable_type User... It seems as though if it is keeping track
> > > > > > of
> > > > > > the commentable_type it shouldn't be hard to extend to other models
> > > > > > than user... I was under the impression that the recipient_id would
> > > > > > have to be for a user, but does it? If the commentable_type is an
> > > > > > event should I be placing that events id in the recipient_id field?
> > > > > > I
> > > > > > had created a new field event_id where I stored the id, but I think
> > > > > > the way I am doing it is just making it more complicated than it is
> > > > > > supposed to be...
>
> > > > > > Does that make any more sense?
>
> > > > > > On Sep 30, 2:39 am, Fritzek <[EMAIL PROTECTED]> wrote:
> > > > > > > I'm completely mystified about what you try to say. Both posts.
>
> > > > > > > On Sep 30, 2:34 am, jdutil <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > How is the code handling @commentable exactly do I need to do
> > > > > > > > something special for @commentable when its not for the class
> > > > > > > > user? I
> > > > > > > > think the fact that I have been maybe has me making this more
> > > > > > > > complicated then it needs to be...
>
> > > > > > > > On Sep 29, 12:27 am, jdutil <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > I am wondering how anyone else handled doing this... I just
> > > > > > > > > had them
> > > > > > > > > working briefly, but not sure what exactly I did since then
> > > > > > > > > but now
> > > > > > im
> > > > > > > > > getting all kinds of errors when trying to view peoples
> > > > > > > > > profiles or
> > > > > > > > > try adding more events now for some reason. So I think I am
> > > > > > > > > going to
> > > > > > > > > try starting this from scratch again, and would appreciate
> > > > > > > > > anyone
> > > > > > else
> > > > > > > > > solution for this that works properly.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CommunityEngine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---