Publisher is EE6 compatible, but it does not support the Fluid field. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Contact forms works ok but Comment not

Status Resolved
Add-on / Version Custom System Messages
Severity Trivial
EE Version 24

rijgedrag

Jan 16, 2013

EE: 2.5.3
Custom System Messages: 2.4.2

Comment form is working and gives the errors perfectly but when the form is filled out OK ik gives the error

AJAX Error
The response was not a valid JSON object.

The comment is submitted but it gives this error anyway. I have made a testing page see:

http://www.rijgedrag.nl/test/comment/wegmisbruikers_-_bromfietsers_rijden_te_hard_en_zijn_de_sjaak_3d

 

{exp:system_messages:js}
</head>
<body>


{exp:channel:entries channel="video" limit="1" disable="member_data" paginate="bottom" entry_id="127"}

<article id="post-{entry_id}" class="post-{entry_id} post">
       <div class="entry-content">
  {exp:antenna url='{video}' max_width="960" max_height="720" cache_minutes="120" wmode="transparent|opaque|window"} 
   {embed_code}
  {/exp:antenna}
  {exp:ce_img:pair src="{afbeelding}" max="500"}<img src="{made}" alt="" width="100%" height="100%" />{/exp:ce_img:pair}<br />{tekst}
 </div>
</article>

 
{exp:comment:entries sort="desc" limit="20" }
 <div id="author-bio">
             <b>{name} op </b> {comment_date format="%Y %m %d"}{comment}
 </div><!--end author-bio-->
{/exp:comment:entries} 


<div id="omg"></div>
{exp:system_messages:form message_container="#omg"}
<br /><br />

{exp:comment:form enable_uploads="y" upload_dir_id="2" form:id="contact_form" template="contact_form"}

 <label for="author">Naam (verplicht)</label><br />
 <input type="text" class="text" name="name" id="author" value="" size="22" >
<br /><br />
        <label for="email">E-mail</label><br />
 <input type="text" class="text" name="email" id="email" value="" size="22">
<br /><br />
        <label for="comment">Reactie</label><br />
 <textarea name="comment" id="comment" class="input-xlarge" tabindex="4">{comment}</textarea>
<br /><br />
      

{if captcha}
 <div>                
        <label for="comment">voor het woord in wat u hieronder ziet:</label><br /><br />
        <label for="comment">{captcha}</label><input type="text" name="captcha" value="" size="20" maxlength="20"  />
    </div>
{/if}
 
<br /><br />
<input name="submit" type="submit" id="submit" value="Send" ></label></div>

  {/exp:comment:form}  

{/exp:system_messages:form}

{/exp:channel:entries}

  
</body>
</html>
#1

BoldMinded (Brian)

Jan 16, 2013

Try setting the parameter redirect_on_success=“no”

#2

Marcus

Jan 17, 2013

If you mean

{exp:system_messages:form message_container=”#omg” redirect_on_success=“no”}

then I have the same problem (notice)

#3

BoldMinded (Brian)

Jan 17, 2013

Marcus, I think this is one of the forms that does not work with the Ajax submission. Successful comment submissions do not return a JSON object as the response, instead it initiates a URL redirect.

Login to reply