This discussion is related to the
ReplyTo addon.
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?
0 • •
Comments
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •$Redirect = !in_array($OrderBy, array('c.DateInserted', 'c.CommentID'))And later:if ($Redirect) {You change OrderBy, so thats why it redirects. Simple fix would be adding both c.DateInserted and c.CommentID to order by clause.// 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);
Longer, and possibly more correct way would be changing the way how Redirect is checked in main vanilla code.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@mark, @Todd, any ideas?.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Developer at Vanilla Forums, Inc. [GitHub, Twitter]
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •$Redirect = !in_array($OrderBy, array('c.DateInserted', 'c.CommentID'));
$DisplayNewCommentOnly = $this->Form->GetFormValue('DisplayNewCommentOnly');
$this->EventArguments['Redirect'] &= $Redirect;
$this->FireEvent('BeforeCommentRedirect');
if (!$Redirect) {
Developer at Vanilla Forums, Inc. [GitHub, Twitter]
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Developer at Vanilla Forums, Inc. [GitHub, Twitter]
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •