SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    wordpress: can't send comments to articles

    hi,

    when users try to send comments to my articles they get a blank page

    please have a try:
    http://yvideoblogitaly.com/blog/yaho...nline/#respond

    do you know what causes the problem?

    thanks

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,253
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)

    blank page

    When I submitted a test comment the headers were:

    http://yvideoblogitaly.com/blog/wp-comments-post.php
    POST /blog/wp-comments-post.php HTTP/1.1
    HTTP/1.x 301 Moved Permanently
    http://www.yvideoblogitaly.com/blog/wp-comments-post.php
    GET /blog/wp-comments-post.php HTTP/1.1
    HTTP/1.x 405 OK

    (just adding the "www"), but AFAIK 405 is a "method not allowed" (OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT) so I don't know why it says "OK"

    There was absolutely no mark-up in view-source, and it doesn't look like the comment was added to the comment RSS feed.

    Are you getting any error messages or anything in the error log?

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what's the error log?
    so u think it's a template error or what?

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,253
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)

    blank page

    I wish I knew what was wrong. My intuition tells me it has more to do with the 405 response header than a template error, but I'm having trouble getting ideas without knowing more. I didn't see any PHP error messages, and because WordPress uses templates, I don't think you can make direct requests for "inner" PHP files unless the site is completely broken (so the template parser won't kick in).
    You could try the Error Reporting plugin to see if that helps, but if you do, please don't use the email option, and exclude all sub-folders (wp-comments-post.php is in the top level folder). Please note, It hasn't been checked for compatibility for WP ver. 2.5 yet, but it should be fine if you're running <2.5 and may be OK anyway.
    In any case you hopefully can take a look at your server error logs to see if anything helpful is in there. Have you tried finding them with your FTP client or ACP?

  5. #5
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi,

    i tried to switch theme to the default one, but the problem is still there

    how can i check the error in the ftp?

  6. #6
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,253
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)

    errors

    Ruling out a theme problem is a start. It could also be plugin related. If you temporarily disable all the plugins, does the problem persist? If that fixes things, you can re-enable them one-by-one until the problem reappears and then not use the plugin causing the problem.

    The error log could be in a few places depending on your host server. It most likely is next to the site's public html folder. eg with FTP
    Login to site as admin you should see a folder structure something like:

    /cgi-bin/
    /lib/
    /logs/
    /mail/
    /domain_name_here/..this is where you upload your site's files

    If you usually use the site's ACP (eg. Cpanel), there should be something called "logs" or "errors" etc. somewhere.

  7. #7
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i disabled all the plugins and the problem is still there
    anyway i dont find anything in the ftp under LOG and i dont have cpanel

  8. #8
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,253
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)

    error log

    Ruling out a plugin problem is another step towards solving this. Too bad about no error log, I guess your host doesn't give you access to it.
    Other that trying the Error Reporting plugin, I don't have many helpful ideas.
    I'm thinking it might be a URL rewite - or - permission settings - or - corrupt script type of thing but I'm only guessing.

  9. #9
    SitePoint Evangelist praetor's Avatar
    Join Date
    Aug 2005
    Posts
    479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've tried submitting an empty coment and it gave me "The HTTP request method was not accepted by the server" . I've modified the cached html to submit to http://www.yvideoblogitaly.com/blog/...ments-post.php and now you have a comment from me .
    Check your wordpress settings and see if your blog url is www.yvideoblogitaly.com/blog/

  10. #10
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,253
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)

    rewrite

    Yes, the problem seems to have something to do with the non-www URL being sent to the www URL
    Are you using a rewrite with the [QSA] flag?

  11. #11
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    Yes, the problem seems to have something to do with the non-www URL being sent to the www URL
    Are you using a rewrite with the [QSA] flag?
    what is [QSA] flag?
    i simply use the rewrite of the admin wp tool

  12. #12
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,253
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)

    Qsa

    QSA stands for Query String Append
    AFAIK, if the rewrite doesn't explicilty capture and use the query string, using this flag will pass it along to the new URL
    From the documentation http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
    This flag forces the rewriting engine to append a query string part in the substitution string to the existing one instead of replacing it. Use this when you want to add more data to the query string via a rewrite rule.
    If you aren't using it, I was thinking that maybe when the non-www URL gets rewritten to the www URL the query string (ie. any GET variables) are getting "stripped off".
    What is confusing, is that the non-www URL is a POST request
    Code:
    http://yvideoblogitaly.com/blog/wp-comments-post.php
    POST /blog/wp-comments-post.php HTTP/1.1
    HTTP/1.x 301 Moved Permanently
    but the www URL is a GET request
    Code:
    http://www.yvideoblogitaly.com/blog/wp-comments-post.php
    GET /blog/wp-comments-post.php HTTP/1.1
    HTTP/1.x 405 OK
    Maybe WordPress only allows POST requests for comments and is refusing the GET request? If so, the question is how/why is Apache changing from POST to GET in the rewrite process?

    EDIT: I tried a local copy of the page and changed the action to a "www" URL (ala praetor) and tried it with the method as "get" - request refused.

    You will either need to change the form's action to the "www" URL, or figure out how/why the rewrite is changing it to get, or maybe change WordPress to accept GET requests.

  13. #13
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i putt www. into the blog url and it works now
    thanks a lot guys

  14. #14
    SitePoint Enthusiast websavy's Avatar
    Join Date
    May 2008
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think it is now working, I just post a test comment...

  15. #15
    SitePoint Enthusiast aikabeatrice's Avatar
    Join Date
    May 2008
    Location
    Nevada
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    my teammate had the same problem as yours, I'm gonna forward this to him. Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •