Cannot Create Comment (Invalid Language Code Error)

Author Message

Chad Paulson

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.

Jan Komárek

Monday 12 April 2010 1:12:07 pm

Hello,

after one clear cache I see this error on every attempt to edit any content. Even in administration interface. I have no idea what to do. I didnt change any ini settings. Nothinng around languages.

Any ideas what to do? Its EZP 4.1

Thanks for every idea.

Vebloud

Jan Komárek

Monday 12 April 2010 1:31:51 pm

,

Nicolas Pastorino

Tuesday 13 April 2010 3:44:10 am

"

after one clear cache I see this error on every attempt to edit any content. Even in administration interface. I have no idea what to do. I didnt change any ini settings. Nothinng around languages.

Any ideas what to do? Its EZP 4.1

"

Hi Jan,

Are you using a standard eZ Publish installation ? What languages are used ? (you can see this from the administration interface, Setup > Languages ).

Let us know,
Cheers

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Jan Komárek

Thursday 15 April 2010 2:30:50 pm

Hi Nicolas,

thanks for reply. I am using EZ webin Instalation. Version 4.1.0 used languages are cze-CZ (main and only one which really used), eng-US and eng-GB.

Whole site have only few changes in css and settings (image sizes and other small things).

Jan

Nicolas Pastorino

Friday 16 April 2010 2:08:39 am

We may need more debug info about this. Would you mind turning you eZ Publish instance into debug mode, as follows (to be written either in a global override of site.ini, weither in the siteaccess' ) :

[DebugSettings]
DebugOutput=enabled

[TemplateSettings]
Debug=enabled
ShowXHTMLCode=disabled
ShowUsedTemplates=enabled
DevelopmentMode=enabled

[ContentSettings]
ViewCaching=disabled

and tell us if you see any valuable information when the error occurs ?

Let us know,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Jan Komárek

Friday 16 April 2010 8:01:52 am



Error: eZLocale Apr 16 2010 15:14:55
Could not load country settings for CZ
Error: eZLocale Apr 16 2010 15:14:55
Could not load language settings for cze
Timing: Apr 16 2010 15:14:55
Module start 'content'
Error: Can not find language. Apr 16 2010 15:14:55
No such locale cze-CZ!
Debug: ezi18n Apr 16 2010 15:14:55
No translation for file(translation.ts) in context(lib/template): 'The maximum nesting level of %max has been reached. The execution is stopped to avoid infinite recursion.' with comment()
Error: error/view.php Apr 16 2010 15:14:55
Error ocurred using URI: /index.php/ezwebin_site_admin/content/edit/66/f/cze-CZ
Notice: Apr 16 2010 15:14:55
eZTemplate: Loading template "error/kernel/5.tpl" with resource "design"
Notice: Apr 16 2010 15:14:55
design/admin/templates/error/kernel/5.tpl, iso-8859-1
Warning: PHP Apr 16 2010 15:14:55
DOMDocument::relaxNGValidate() [<a href='domdocument.relaxngvalidate'>domdocument.relaxngvalidate</a>]: I/O warning : failed to load external entity &quot;/var/www/vhosts/domecekukostku.cz/httpdocs/schemas/translation/ts.rng&quot; in /var/www/vhosts/domecekukostku.cz/httpdocs/lib/ezi18n/classes/eztstranslator.php on line 359
Warning: PHP Apr 16 2010 15:14:55
DOMDocument::relaxNGValidate() [<a href='domdocument.relaxngvalidate'>domdocument.relaxngvalidate</a>]: xmlRelaxNGParse: could not load /var/www/vhosts/domecekukostku.cz/httpdocs/schemas/translation/ts.rng in /var/www/vhosts/domecekukostku.cz/httpdocs/lib/ezi18n/classes/eztstranslator.php on line 359
Warning: PHP Apr 16 2010 15:14:55
DOMDocument::relaxNGValidate() [<a href='domdocument.relaxngvalidate'>domdocument.relaxngvalidate</a>]: Invalid RelaxNG in /var/www/vhosts/domecekukostku.cz/httpdocs/lib/ezi18n/classes/eztstranslator.php on line 359
Warning: eZTSTranslator::loadTranslationFile Apr 16 2010 15:14:55
XML text for file extension/ezwebin/translations/cze-CZ/translation.ts did not validate
Warning: PHP Apr 16 2010 15:14:55
DOMDocument::relaxNGValidate() [<a href='domdocument.relaxngvalidate'>domdocument.relaxngvalidate</a>]: I/O warning : failed to load external entity &quot;/var/www/vhosts/domecekukostku.cz/httpdocs/schemas/translation/ts.rng&quot; in /var/www/vhosts/domecekukostku.cz/httpdocs/lib/ezi18n/classes/eztstranslator.php on line 359
Warning: PHP Apr 16 2010 15:14:55
DOMDocument::relaxNGValidate() [<a href='domdocument.relaxngvalidate'>domdocument.relaxngvalidate</a>]: xmlRelaxNGParse: could not load /var/www/vhosts/domecekukostku.cz/httpdocs/schemas/translation/ts.rng in /var/www/vhosts/domecekukostku.cz/httpdocs/lib/ezi18n/classes/eztstranslator.php on line 359
Warning: PHP Apr 16 2010 15:14:55
DOMDocument::relaxNGValidate() [<a href='domdocument.relaxngvalidate'>domdocument.relaxngvalidate</a>]: Invalid RelaxNG in /var/www/vhosts/domecekukostku.cz/httpdocs/lib/ezi18n/classes/eztstranslator.php on line 359
Warning: eZTSTranslator::loadTranslationFile Apr 16 2010 15:14:55
XML text for file extension/ezoe/translations/cze-CZ/translation.ts did not validate
Warning: PHP Apr 16 2010 15:14:55
DOMDocument::relaxNGValidate() [<a href='domdocument.relaxngvalidate'>domdocument.relaxngvalidate</a>]: I/O warning : failed to load external entity &quot;/var/www/vhosts/domecekukostku.cz/httpdocs/schemas/translation/ts.rng&quot; in /var/www/vhosts/domecekukostku.cz/httpdocs/lib/ezi18n/classes/eztstranslator.php on line 359
Warning: PHP Apr 16 2010 15:14:55
DOMDocument::relaxNGValidate() [<a href='domdocument.relaxngvalidate'>domdocument.relaxngvalidate</a>]: xmlRelaxNGParse: could not load /var/www/vhosts/domecekukostku.cz/httpdocs/schemas/translation/ts.rng in /var/www/vhosts/domecekukostku.cz/httpdocs/lib/ezi18n/classes/eztstranslator.php on line 359
Warning: PHP Apr 16 2010 15:14:55
DOMDocument::relaxNGValidate() [<a href='domdocument.relaxngvalidate'>domdocument.relaxngvalidate</a>]: Invalid RelaxNG in /var/www/vhosts/domecekukostku.cz/httpdocs/lib/ezi18n/classes/eztstranslator.php on line 359
Warning: eZTSTranslator::loadTranslationFile Apr 16 2010 15:14:55
XML text for file extension/ezodf/translations/cze-CZ/translation.ts did not validate
Debug: eZTSTranslator::loadTranslationFile: tried paths Apr 16 2010 15:14:55
extension/ezwebin/translations/cze-CZ/utf-8/translation.ts
extension/ezwebin/translations/cze-CZ/translation.ts
extension/ezoe/translations/cze-CZ/utf-8/translation.ts
extension/ezoe/translations/cze-CZ/translation.ts
extension/ezodf/translations/cze-CZ/utf-8/translation.ts
extension/ezodf/translations/cze-CZ/translation.ts

I checked tanslation file in ezwebin package. And its on proper place.

In country.ini fole are czech settings:

[CZ]
Name=Czech Republic
Alpha2=CZ
Alpha3=CZE
IDC=420

Nicolas Pastorino

Monday 19 April 2010 12:16:33 am

Can you confirm these files exist, are accessible by the Apache/Webserver user, and are not empty :

  • <ezroot>/share/translations/cze-CZ/translation.ts
  • <ezroot>/share/locale/cze-CZ.ini

?

Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Jan Komárek

Monday 19 April 2010 3:13:31 am

I can only unbelievably stare on place where whole share directory should be! I have no idea how this could happend. I dont remember any activity on FTP or anything else what could delete this folder.

But this is it. I upload share folder from clear EZ Publish package and everything is OK.

Thank you very much. You just save me a lot of time.

Nicolas Pastorino

Monday 19 April 2010 3:20:40 am

I can picture you staring at the file explorer, puzzled (not laughing ;) ).

Good to have this solved!

Cheers Jan !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

valentin maior

Monday 11 April 2011 6:03:37 am

Thanks a lot guys...had same problem after retrieving project from ftp....saved half of my day.

Nicolas Pastorino

Monday 11 April 2011 6:17:01 am

"

Thanks a lot guys...had same problem after retrieving project from ftp....saved half of my day.

"

Good to read, that was a useful thread it seems !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 04:54:47
Script start
Timing: Jan 18 2025 04:54:47
Module start 'layout'
Timing: Jan 18 2025 04:54:47
Module start 'content'
Timing: Jan 18 2025 04:54:48
Module end 'content'
Timing: Jan 18 2025 04:54:48
Script end

Main resources:

Total runtime0.8902 sec
Peak memory usage4,096.0000 KB
Database Queries88

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 589.1797152.6406
Module start 'layout' 0.00500.0020 741.820339.4922
Module start 'content' 0.00700.8819 781.3125869.1328
Module end 'content' 0.88890.0013 1,650.445340.1250
Script end 0.8902  1,690.5703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3313160.0002
Check MTime0.00120.1372160.0001
Mysql Total
Database connection0.00090.103710.0009
Mysqli_queries0.692677.7990880.0079
Looping result0.00100.1094860.0000
Template Total0.863297.020.4316
Template load0.00210.230420.0010
Template processing0.861196.725620.4305
Template load and register function0.00020.025210.0002
states
state_id_array0.00130.141610.0013
state_identifier_array0.00110.122320.0005
Override
Cache load0.00270.29902620.0000
Sytem overhead
Fetch class attribute can translate value0.00100.109140.0002
Fetch class attribute name0.00140.1556150.0001
XML
Image XML parsing0.00530.598540.0013
class_abstraction
Instantiating content class attribute0.00010.0065230.0000
General
dbfile0.00510.5737270.0002
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
11content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
12content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
25content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
23content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
21content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
42content/datatype/view/ezxmltags/td.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/td.tplEdit templateOverride template
42content/datatype/view/ezxmltags/tr.tpl<No override>extension/community/design/community/templates/content/datatype/view/ezxmltags/tr.tplEdit templateOverride template
1content/datatype/view/ezxmltags/table.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/table.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 192
 Number of unique templates used: 14

Time used to render debug report: 0.0001 secs