Thursday 29 November 2007 10:01:06 am
[11/29/2007 11:50 am] The draft could not be created. (5) Invalid language code provided. The draft could not be created. I receive the above error when trying to post a comment under a piece of content. I am passing the correct node id, as well as the proper language code. There are two steps to the comment. Step one is a form button that redirects the user to the edit comment template. Below is the form code for both steps. Step 1:
<div class="content-action">
<form method="post" action="/cms/index.php/mysiteaccess/content/action">
<input type="hidden" name="ClassIdentifier" value="comment" />
<input type="hidden" name="NodeID" value="312" />
<input type="hidden" name="ContentLanguageCode" value="eng-US" />
<input type="hidden" name="RedirectURIAfterPublish" value="/cms/index.php/mysiteaccess/path/to/content/" />
<input class="button new_comment" type="submit" name="NewButton" value="New comment" />
</form> </div> Step 2: <form enctype="multipart/form-data" method="post" action="/cms/index.php/crowdspring/content/edit/666/1/Array">
<div class="edit"> <div class="class-article-comment"> <h1>Edit Comment - New Comment</h1> <br/>
<div class="block">
<label>Subject</label><div class="labelbreak"></div>
<input type="hidden" name="ContentObjectAttribute_id[]" value="5337" />
<input class="box" type="text" size="70" name="ContentObjectAttribute_ezstring_data_text_5337" value="" /> </div>
<div class="block">
<input type="hidden" name="ContentObjectAttribute_ezstring_data_text_" value="Chad Paulson" />
</div>
<div class="block">
<label>Message</label><div class="labelbreak"></div>
<input type="hidden" name="ContentObjectAttribute_id[]" value="5338" />
<textarea class="box" cols="70" rows="10" name="ContentObjectAttribute_data_text_5338"></textarea> </div>
<div class="buttonblock">
<input class="defaultbutton" type="submit" name="PublishButton" value="Send for publishing" />
<input class="button" type="submit" name="DiscardButton" value="Discard" />
<input type="hidden" name="MainNodeID" value="312" />
<input type="hidden" name="DiscardConfirm" value="0" />
<input type="hidden" name="NodeID" value="312" />
</div>
</div>
</div> </form> So, despite the language code being clearly defined in the initial form (<input type="hidden" name="ContentLanguageCode" value="eng-US" />), I am still receiving me this error.
|