The ReplyTo plugin is preventing comments from being submitted without a page reload. I ran several tests on a fresh install to confirm. The problem affects replies as well as normal comments. Any idea how to fix this?
@judgej AJAX does not get disabled. It still works via AJAX, but adds a redirect. Here is why. There is something in applications/vanilla/controllers/class.postcontroller.php:
if ($Redirect) { // The user posted a comment on a page other than the last one, so just redirect to the last page. $this->RedirectUrl = Gdn::Request()->Url("discussion/comment/$CommentID/#Comment_$CommentID", TRUE);
You change OrderBy, so thats why it redirects. Simple fix would be adding both c.DateInserted and c.CommentID to order by clause.
Longer, and possibly more correct way would be changing the way how Redirect is checked in main vanilla code.
Nice fix - thanks! I'll get that added (probably next week now, as I'm pretty busy this week), but I will get it in. It does seem like it could be a workaround with limited life though.
I guess a proper fix would be to use an API to check what page the post would be on, and redirect only if it is on a different page. If you replied to the last comment on page one of a two-page discussion, then that would require a redirect to take you to page two.
This redirect will happen even without this module if you do not have massively-long pages (like this forum, and may even be why this forum page length has been set so high) so it does look like a core problem with a fix needing to go in to the core. I expect a longer-term fix would be to use AJAX to replace much larger portions of the page, i.e. all of the discussion displayed on the page and not just individual comments.
Nope, this simple fix won't work. It checks for first element in order by clause. Something has to be done with postcontroller itself. Maybe add new event before that if mentioned above.
I am trying to implement this fix to have Reply To play nice with an embedded installation of Vanilla but the fix suggested above does not seem to work. Any other ideas to prevent the redirect when Vanilla is embedded?
I was having issues with email notifications on my forum and narrowed it down to one of the plugins. Turns out, this plugin caused my "new comment" emails to not go out! Disabled it and all notifications were back to normal. It's most likely related to the AJAX issues mentioned above.
Comments
My question is also: any idea how to fix this?
I'm not sure why it affects non-reply comments though, as I didn't think I touched that bit of the code.
Longer, and possibly more correct way would be changing the way how Redirect is checked in main vanilla code.
I guess a proper fix would be to use an API to check what page the post would be on, and redirect only if it is on a different page. If you replied to the last comment on page one of a two-page discussion, then that would require a redirect to take you to page two.
This redirect will happen even without this module if you do not have massively-long pages (like this forum, and may even be why this forum page length has been set so high) so it does look like a core problem with a fix needing to go in to the core. I expect a longer-term fix would be to use AJAX to replace much larger portions of the page, i.e. all of the discussion displayed on the page and not just individual comments.
-- Jason
@mark, @Todd, any ideas?.
I am trying to implement this fix to have Reply To play nice with an embedded installation of Vanilla but the fix suggested above does not seem to work. Any other ideas to prevent the redirect when Vanilla is embedded?
I was having issues with email notifications on my forum and narrowed it down to one of the plugins. Turns out, this plugin caused my "new comment" emails to not go out! Disabled it and all notifications were back to normal. It's most likely related to the AJAX issues mentioned above.