Comment Submit HTTP Error 500 (Internal Server Error): An unexpected condition was encountered
  • Hello, I am working on the comment form, but I have a problem.

     this is my code:



    {{ comment_form html_code="id=\"commentform\"" submit_button="Enviar" button_html_code="tabindex=\"6\"" button_html_code="class=\"enviar\"" }}

    <label for="author"><small>Nombre y Apellido</small></label>
    {{ camp_edit object="comment" attribute="nickname" html_code="id=\"author\" 22\" tabindex=\"1\"" }}

    <label for="email"><small>Correo Electronico:  </small></label>
    {{ camp_edit object="comment" attribute="reader_email" html_code="id=\"email\" 22\" tabindex=\"2\"" }}


    <label for="email"><small>Titulo</small></label>
    {{ camp_edit object="comment" attribute="subject" html_code="id=\"comment-subject\" tabindex=\"3\"" }}

    <label for="comment"><small>Comentario</small></label>
    {{ camp_edit object="comment" attribute="content" html_code="id=\"comment\" rows=\"5\" tabindex=\"4\"" }}


    <label for="f_captcha_code"><small>Ingrese el Codigo:</small></label>

    {{ camp_edit object="captcha" attribute="code" html_code="id=\"comment-code\" tabindex=\"5\"" }}<br />
    <img src="{{ captcha_image_link }}"><br />

    {{ /comment_form }}
       
       
    {{ if $gimme->submit_comment_action->defined }}
          {{ if $gimme->submit_comment_action->is_error }}
            <div class="error_cmt"><strong>Error:Fields missing </strong></div>
          {{ else }}
            <div class="approved_cmt"><strong> Comment was sent.</strong>
            </div>
          {{ /if }}
        {{ /if }}


    If  the fields are empty I get the "Error:Fields missing", which is good, but when I fill everything I get this error:


    HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.


    I have to reload for the page to appear again


    Weird Thing is that the form works, I get the HTTP Error 500  but the comment appears on the newscoop admin platform, 



    Is there a way i can fix this??


    Thanks a lot.

  • 2 Comments sorted by
  • Hi,
    code looks ok (I would just suggest using {{ recaptcha }} instead of this {{ camp_edit object="captcha" attribute="code" html_code="id=\"comment-code\" tabindex=\"5\"" }}<br /><img src="{{ captcha_image_link }}"><br />. For this to work, you will need to enable reCATCHA plugin in plugins dropdown in Newscoop menu).
    What version of Newscoop are you using?
    --
    Ljuba Rankovic
    Senior Front End Developer, Sourcefabric
    ljuba.rankovic@sourcefabric.org

    http://www.sourcefabric.org
    http://www.twitter.com/Sourcefabric
  • Hello, thanks for ht reply.

    I am using NewsCoop 4.1.0, 
    tried what you suggested, but after i submit the form I get a black page with this message:

    Could not open socket


    Thank you