WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
[resolved] submit_comment sends me to url (3 posts)

  1. _PeterL
    Member
    Posted 1 year ago #

    When I try to submit a comment using, for example: http://mysite.com/api/respond/submit_comment/?post_id=54253&name=peter&email=test@peter.com&content=test

    The post doesn't submit. Instead I'm redirected to:
    http://mysite.com/peter_and_here_are_some_other_words_to_a_page/?post_id=54253&email=supervalpen%40gmail.com&content=grattis

    When I submit a name like "asdasfdgfs" the comment submits without any troubles (but choses my wordpress-name instead if I am logged in).

    http://wordpress.org/extend/plugins/json-api/

  2. Muhammad Mahmoud
    Member
    Posted 1 year ago #

    i don't know if you are still need the solution , it's 2 months ago :)

    but i were facing same problem and found that the wordpress reserve the variable ( name ) , check -> Reserved Terms

    so the solution is hard-code one you have to change the code on the plugin files of
    $_REQUEST[name] to another name that not reserved by wordpress like $_REQUEST[cname]
    and ofcourse use this new name on your query

  3. dezahyner
    Member
    Posted 7 months ago #

    can you share your javascript on how you were able to successfully submit comments?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic