As noted, the form submits but the data doesn't go into the db. Looking at the rendered HTML, I notice a missing XID. I think this is what is causing the problem - anyone know why this would happen?

{exp:comment:form channel="articles" entry_id="{embed:entry_id}"}

    {if logged_out}
            <label for="name">Name:</label><input type="text" name="name" value="{name}" size="50" /><br />
            <label for="email">Email:</label> <input type="text" name="email" value="{email}" size="50" /><br />

    <label for="comment">Comment:</label>
    <textarea name="comment" cols="70" rows="10">{comment}</textarea>
    <label><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information</label>
    <br />
    {if captcha}
            <label for="captcha">Please enter the word you see in the image below:</label><br />
            <p class="captcha">{captcha}<input type="text" name="captcha" value="{captcha_word}" maxlength="20" style="width: 200px; float: left;" /></p>
    <br />
    <input type="submit" name="submit" value="Submit" />



<form id="comment_form" method="post" action="http://domain.com/newsroom_article/core-to-corporate">
        <div class="hiddenFields" style="display: none;">
        <input type="hidden" name="ACT" value="29">
        <input type="hidden" name="RET" value="http://domain.com/newsroom_article/core-to-corporate">
        <input type="hidden" name="URI" value="newsroom_article/core-to-corporate">
        <input type="hidden" name="PRV" value="">
        <input type="hidden" name="XID" value="">
        <input type="hidden" name="entry_id" value="3327">
        <input type="hidden" name="site_id" value="1">
        <label for="name">Name:</label><input type="text" name="name" value="" size="50"><br>
        <label for="email">Email:</label> <input type="text" name="email" value="" size="50"><br>

        <label for="comment">Comment:</label>
        <textarea name="comment" cols="70" rows="10"></textarea>
        <label><input type="checkbox" name="save_info" value="yes"> Remember my personal information</label>
        <!--                                                    <label><input type="checkbox" name="notify_me" value="yes"  /> Notify me of follow-up comments?</label> -->
        <label for="captcha">Please enter the word you see in the image below:</label><br>
        <p class="captcha"><img src="http://domain.com/images/captchas/1354086872.7556.jpg" width="140" height="30" style="border:0;" alt=" "><input type="text" name="captcha" value="" maxlength="20" style="width: 200px; float: left;"></p>
        <input type="submit" name="submit" value="Submit">
  • Does your .htaccess have rules to add a trailing slash to URLs? I've had that bork form submissions in the past.
    – Tyssen
    Nov 28, 2012 at 7:46
  • Can you try testing the form outside the embed first and make sure it works? Is there a reason why you are embedding the comment form? Does the embed live outside the channel entries tag? Nov 28, 2012 at 9:22

2 Answers 2


Generally if form submissions aren't working, your .htaccess file is to blame.

Specifically, if you are using NSM htaccess generator, I've seen numerous problems with that, so avoid it. Also, if you are trying to force trailing slashes, stop now. EE 2.x really likes no trailing slash, and fighting it gets you nowhere.

The best solution is always to use the official htaccess, and nothing else:

RewriteEngine On

# Removes index.php from ExpressionEngine URLs
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
  • That did it- and I've had to do that before... not sure why it didn't register in my brain at midnight lol. Nov 28, 2012 at 16:40
  • I had the same problem, tried a lot, nothing worked but when I uninstalled NSM htaccess generator I could I could post comments
    – awa
    May 22, 2013 at 8:42

If secure forms is set to no in security settings, EE's forms don't use XID. Whilst this doesn't solve the problem of the data not saving, it should explain why there is no XID...

  • OK, it is set to No, so that explains that. I'll keep looking. Hope you are well Iain. Nov 28, 2012 at 7:30
  • Setting 'secure_forms' to 'y' in my config file returned the XID to the forms.
    – yuvilio
    May 1, 2013 at 17:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.