Viewing 6 replies - 1 through 6 (of 6 total)
  • Same here. Anyone?

    Huuuh, I am not sure I understand, but… try to find the *form* of the comment, and check for action=”something” in the <form> tag. that’s the place the user will be taken after he adds a comment. Although I do not know if changing it will keep the comments form functioning.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    It will, for lack of better words, kill the comments, because WP needs to call on wp-comments-post.php to actually post the comment in the database. If you redirect them to index.php?p=88, hitting the post comment button will do exactly that, redirect them to index.php?p=88, but it won’t post the comment. You’ll just have to find out who’s refreshing while they post a comment.

    Thread Starter Anonymous

    macmanx, the original post was about redirecting AFTER comments are posted.
    these days it is a common programming practice to redirected after form submissions as the original author asks to avoid double posting, which is fairly common.
    someone should submit this as a bug and ensure redirects happen after all form submissions.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    From what I can tell, la_haine is saying that he/she does not want the browser to go to ‘http://joeblade.com/wp/wp-comments-post.php&#8217;, because hitting a refresh could repost the comment. That is true, but the browser needs to access this file to post the comment. The way everything works by default is you go to ‘http://joeblade.com/index.php?p=88&#8217; to enter the comment, when you post the comment you’re sent to ‘http://joeblade.com/wp/wp-comments-post.php&#8217; so that it’s entered into the database, and then you are sent back to ‘http://joeblade.com/index.php?p=88&#8217;. You cannot take wp-comments-post.php out of the loop.

    I think it shudn’t be hard…just needs little bit of js.
    You can add a hidden type in the comments form called “redirect” or whatever u want and put its value = index.php?p=88 and then in the wp-comments.php (same file) check if the form was submitted and the redirect value exists….then use the php header to redirect to the value of redirect.
    may be the code in the following link (google’s cached result) will help u to get started
    http://216.239.57.104/search?q=cache:822bXvQfbIEJ:www.clickfire.com/viewpoints/articles/webdevelopment/create_php_form.php+redirect+form+php&hl=en

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Redirecting after comments have been posted’ is closed to new replies.