Forums / General / Error creating a new object

Error creating a new object

Author Message

Neidy Tunzine

Thursday 07 June 2007 12:01:07 am

whenever i create a new object in the user interface i get the following error:
Erro / kernel (3)

<b>Error message</b>
The language code [] specified in ContentLanguageCode does not exist in the system.
error/view.php:
Error ocurred using URI: /por/content/action

<form method="post" action={"content/action/"|ezurl}>
            <input class="button forum-new-topic" type="submit" name="NewButton" value="{'New topic'|i18n( 'design/ezwebin/full/forum' )}" />
            <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
            <input type="hidden" name="ContentObjectID" value="{$node.contentobject_id.}" />
			<input type="hidden" name="ContentLanguageCode" value="{ezini( 'RegionalSettings', 'Locale', 'site.ini')}" />
			<input type="hidden" name="NodeID" value="{$node.node_id}" />
            <input type="hidden" name="ClassIdentifier" value="forum_topic_maputo" />
</form>
 

I am running EzPublish version 3.9.0

Hope to get a reply soon and Thanks in advance!

Regards,
Neidy

http://www.mzbusiness.com

Łukasz Serwatka

Friday 08 June 2007 6:56:31 am

Hi,

Possible reasons that you have got such error message are:
1. ContentLanguageCode POST variable has no value
2. Language does not exist in database, check ezcontent_language table. Also check languages in Setup->Languages

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Łukasz Serwatka

Friday 08 June 2007 9:30:45 am

In addition make sure that your site.ini.RegionalSettings.SiteLanguageList[] contains all necessary locales.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Neidy Tunzine

Saturday 09 June 2007 1:08:51 am

Hi Lukasz,

I checked if the language exists in setup>languages, and i changed the code to make sure <i>ContentLanguageCode</i> has the right value, but i still have the same problem.

<form method="post" action={"content/action/"|ezurl}>
<input class="button forum-new-topic" type="submit" name="NewButton" value="{'New topic'|i18n( 'design/ezwebin/full/forum' )}" />
<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$node.contentobject_id.}" />
<input type="hidden" name="ContentLanguageCode" value="por-MZ" />
<input type="hidden" name="NodeID" value="{$node.node_id}" />
<input type="hidden" name="ClassIdentifier" value="forum_topic_maputo" />
</form>

http://www.mzbusiness.com

Łukasz Serwatka

Saturday 09 June 2007 3:26:50 am

Hi again,

SiteLanguageList[] contains your locale?

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Julien Plesniak

Tuesday 31 July 2007 12:03:01 am

Do you find the problem? i have the same :(

My Form:

<form method="post" action={"content/action/"|ezurl}>
            <input class="button forum-new-topic" type="submit" name="NewButton" value="{'New topic'|i18n( 'design/ezwebin/full/forum' )}" />
            <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
            <input type="hidden" name="ContentObjectID" value="{$node.contentobject_id.}" />
            <input type="hidden" name="ContentLanguageCode" value="{ezini( 'RegionalSettings', 'Locale', 'site.ini')}" />
            <input class="button forum-keep-me-updated" type="submit" name="ActionAddToNotification" value="{'Keep me updated'|i18n( 'design/ezwebin/full/forum' )}" />
            <input type="hidden" name="NodeID" value="{$node.node_id}" />
            <input type="hidden" name="ClassIdentifier" value="forum_topic" />
        </form>

My file site.ini.append.php

[RegionalSettings]
Locale=fre-FR
ContentObjectLocale=fre-FR
ShowUntranslatedObjects=enabled
SiteLanguageList[]=fre-FR
TextTranslation=enabled

And the source when i launch my form:

  <form method="post" action="/index.php/fre/content/action">
            <input class="button forum-new-topic" type="submit" name="NewButton" value="Nouveau sujet" />
            <input type="hidden" name="ContentNodeID" value="412" />
            <input type="hidden" name="ContentObjectID" value="486" />
            <input type="hidden" name="ContentLanguageCode" value="fre-FR" />
            <input class="button forum-keep-me-updated" type="submit" name="ActionAddToNotification" value="Me tenir informé" />
            <input type="hidden" name="NodeID" value="412" />
            <input type="hidden" name="ClassIdentifier" value="forum_topic" />
        </form>

thanks for help

Julien Plesniak

Tuesday 31 July 2007 12:50:59 am

The problem is in the file kernel/content/action.php

if ( $http->hasPostVariable( 'ContentLanguageCode' ) )
    {
        include_once( 'kernel/classes/ezcontentlanguage.php' );
        $languageCode = $http->postVariable( 'ContentLanguageCode' );
        $languageID = eZContentLanguage::idByLocale( $languageCode );
        if ( $languageID === false )
        {
            eZDebug::writeError( "The language code [$languageCode] specified in ContentLanguageCode does not exist in the system." );
            return $module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel' );
        }
    }

If i do an echo $languageCode; , it return "" and if i write
$languageCode = "fre-FR";

the script work.

Does someone have an idea?

thanks

eZ debug

Timing: Jan 18 2025 11:01:06
Script start
Timing: Jan 18 2025 11:01:06
Module start 'content'
Timing: Jan 18 2025 11:01:07
Module end 'content'
Timing: Jan 18 2025 11:01:07
Script end

Main resources:

Total runtime0.9420 sec
Peak memory usage4,096.0000 KB
Database Queries208

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.7031180.8438
Module start 'content' 0.00660.7825 768.5469644.5469
Module end 'content' 0.78900.1529 1,413.0938345.0703
Script end 0.9419  1,758.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.5116210.0002
Check MTime0.00210.2264210.0001
Mysql Total
Database connection0.00070.076010.0007
Mysqli_queries0.846589.86022080.0041
Looping result0.00220.23172060.0000
Template Total0.905696.120.4528
Template load0.00230.245920.0012
Template processing0.903395.890020.4516
Template load and register function0.00020.020510.0002
states
state_id_array0.00140.147810.0014
state_identifier_array0.00200.211320.0010
Override
Cache load0.00210.2198480.0000
Sytem overhead
Fetch class attribute can translate value0.00140.148440.0003
Fetch class attribute name0.00150.155980.0002
XML
Image XML parsing0.00180.196140.0005
class_abstraction
Instantiating content class attribute0.00000.0026100.0000
General
dbfile0.00720.7639290.0002
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 38
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs