• Resolved yahyaman

    (@yahyaman)


    Hi, I recently using this plugin and at first I think it’s suitable plugin I need. I try to post a question with admin login and it worked, a post created containing my question. Then the problem goes here, when I tried (also as admin) to answer the question-which is commented the post-then error occured, showing message error below:

    Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\xampp\htdocs\simple2\wp-includes\general-template.php:372) in D:\xampp\xampp\htdocs\simple2\wp-includes\pluggable.php on line 934

    For now I disable the comment on post so that’s the way to answer is by editing the content post then add the answer right after the question. Poorly, the author can’t ask or comment more on the post.

    Honestly I don’t know if the problem lying on WP environment or this plugin, because if I make ordinary post and commented on it, it goes well. Hope there will be any suggestion or help, I’ll really appreciate it.

    http://wordpress.org/extend/plugins/question-and-answer-forum/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author trevorpythag

    (@trevorpythag)

    This sounds similar to errors caused by a bug which I thought I had fixed.

    Is your wordpress installation set up to be able to send mail as an error when sending an email could be the source of the problem.

    To identify the source of the problem could you comment out all of the code in answermail.php by placing \* before the // in answermail.php and */ after the } on the second last line.

    Thread Starter yahyaman

    (@yahyaman)

    owh great, I see..yes, the problem is I try this on localhost (my computer), so there is no mail server has been set up. now that’s I do commenting the answer mail function calling on question.php line 361 it’s then fixed. Later if I have upload it to the actual server I guess it will work fine.

    Hm just now, I’m realize there isn’t any option to disable the new answer notification mail in setting page, is there?
    it’s better than opening the file then add/remove the double slashes.

    anyway, thank you very much for your help 🙂

    Plugin Author trevorpythag

    (@trevorpythag)

    I may add the option for the next update now you’ve pointed out this bug.

    It’s strange that I haven’t also had the error when testing on computers without a mail server – I’ll have a closer look at what could be causing the issue soon.

    Glad I could help

    Plugin Author trevorpythag

    (@trevorpythag)

    I think I now have the cause of the error which isn’t related to thre wp_mail function.

    On line 18 of answermail.php bloginfo('wp_url') needs to be replaced by get_bloginfo('wp_url').

    I will update the release version of the plugin soon.

    When title or question are blank and the user submit the question form, appear errors and when the user want to try again it doesn’t work, why please help me!!
    Look the code in the end of the form:
    $html .= ‘<input type=”button” name=”ask” value=”‘ . __(‘Ask’,’qna-forum’) . ‘” onclick=”askquestion(\’questionform-‘ . $questionformid . ‘\’);”/></div>’;

    I think there is a problem with “$questionformid”, because when i put this variable at 0 it works!
    What did you think about this?
    Thank you!

    Plugin Author trevorpythag

    (@trevorpythag)

    if replacing $questionformid with zero makes the plugin work try setting it to zero at the start of the file.

    What error are you getting?
    Also have you got more than one question form on the page?

    Thank you trevorpythag for your answer!
    Yes when i initialised this variable at 0 it works, and yes i have one question form in my page!
    I want to know if i can do that or it’s not a good method?
    and i just see that when i login in with the user admin i can ask a question but when i login in with another user it don’t works but there is no relation with the variable $questionform.
    I don’t understand!

    Plugin Author trevorpythag

    (@trevorpythag)

    It’s a good method. You could try initialising it in your theme or somewhere else where it won’t get over ridden if you update the plugin in the future.

    I’m as confused as you are about the difference between being logged in as an admin or not.

    Sorry I can’t be of more help

    ok thank you trevorpythag for your help!!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Question and Answer Forum] Comment error on Question Post’ is closed to new replies.