bborn / communityengine

Adds basic social networking capabilities to your existing application, including users, blogs, photos, clippings, favorites, and more.
http://www.communityengine.org
Other
1.14k stars 317 forks source link

Error when editing a comment #287

Closed blehman12 closed 9 years ago

blehman12 commented 9 years ago

When attempting to edit a user comment on their profile as an admin user the edit button the next page renders as like what is shown below. I think it has something to do with the file app/views/comments/edit.js.erb The line $('#comment-<%= @comment.id %>').replaceWith("<%= escape_javascript(render :partial => 'comments/comment', :formats => [:html], :locals => {:comment => @comment, :highlighted => true}) %>")

But right now it is above my skill level to debug this. Though I did spend several hours trying. Any advice on how to fix this? Do you need anymore information to help debug.

Page ouput

http://localhost:3000/Photo/2/comments/2/edit

ActionController::UnknownFormat in CommentsController#edit ActionController::UnknownFormat

Rails.root: /home/blehman/rails_40_proj/testzzz Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"commentable_type"=>"Photo", "commentable_id"=>"2", "id"=>"2"}

Toggle session dump Toggle env dump Response

Headers:

None

Thanks in advance for the help. --Bob

bborn commented 9 years ago

are you using turbolinks?

blehman12 commented 9 years ago

I believe so - here is an output from gem list

gem list turbolinks

* LOCAL GEMS *

turbolinks (2.5.3, 2.5.2, 2.2.2, 1.3.0, 1.1.1)

Should I be?

--Bob

On 02/19/2015 09:56 AM, Bruno Bornsztein wrote:

are you using turbolinks?

— Reply to this email directly or view it on GitHub https://github.com/bborn/communityengine/issues/287#issuecomment-75101841.

bborn commented 9 years ago

If you're on the master branch of CE, then no, you shouldn't include turbolinks (or if you do, be prepared to try to fix all the things it breaks). Edge CE should be (mostly) compatibly with Turbolinks, but it's not well tested yet.