lml/commontator

Upgrading from 5.1 to 6.0.0

Closed this issue ยท 7 comments

Noting any upgrade errors I run into

1 -> no longer appears, removed old views, installed new ones

_app/views/commontator/shared/thread.html.erb
line 70 - wrong number of arguments (given 2, expected 3)

<% comments = show_all ? thread.ordered_comments(true) : thread.paginated_comments(page, per_page) %>

2 - fixed #=> model.commontator_thread.comments.size

comment size - undefined method thread for model
model.thread.comments.size

3

app/views/commontator/threads/_show.html.erb where line #10 raised:
undefined method `asc' for #Arel::Nodes::Grouping:0x00007ff54eaeb938
around line 10 -> comments = thread.paginated_comments(page, nil, show_all)

Ah I believe the first one was a necessary change to support nested comments, while the second one was caused by me namespacing a bunch of the commontator methods (adding a commontator_ prefix), so sorry about that.

The easiest solution is obviously deleting the customized commontator views from your app, but if that is not possible, then beware that the styles also changed a bunch in 6.0.0 to accommodate nested comments etc, so you might want to look into copying the styles from 5.1 as well if you haven't yet.

@Dantemss thanks for the gem and pushing replies into 6.0.0. The namespace fixed the second one. I put in a new commontator initializer file and replaced the views. Got an error (number 3 above)

Thanks for the bug report. It seems config.comment_order = :ve and config.comment_order = :vl are broken and I never noticed because there are no tests for them... oops.

I'll make a fix and release 6.0.1 tonight.

Great - thanks and I'm using :ve as you mentioned.

OK I just released 6.0.1 which should fix :ve and :vl comment ordering. Let me know if you run into any more issues.

Great, upgraded and looks I'm able to get the comments working again -- nice job! Replies also are working nicely. Will be looking at it more tomorrow as I work in my own styling.

Thanks, please open a new issue if you encounter another problem.