Remember me? forgot password | register

SilverStripe Forum

10688 Posts in 2795 Topics by 1518 members

Jump to:

Site Builders

If this is your first visit, you will need to register before you can post. However, you can browse all messages below.

Community » SilverStripe Forum » Site Builders » FATAL ERROR: i18n::include_by_class: Class not found
Page: 1 go to end Reply
Author Topic: FATAL ERROR: i18n::include_by_class: Class not found 1454 views
  • bica
    bica's avatar
    Community Member
    3 posts

    FATAL ERROR: i18n::include_by_class: Class not found Link to this post

    Please, help me fix this error:

    FATAL ERROR: i18n::include_by_class: Class not found
    At line 1258 in D:\xampp\htdocs\silverstripe\sapphire\core\i18n.php

    user_error(i18n::include_by_class: Class not found,512)
    line 1258 of i18n.php

    i18n::include_by_class()
    line 125 of Core.php

    _t(EXPORTCSV,Export to CSV)
    line 139 of DataReport.php

    DataReport->htmlExportButton()
    line 11 of OrderReport.php

    OrderReport->FieldHolder()

    call_user_func_array(Array,Array)
    line 376 of ViewableData.php

    ViewableData->XML_val(FieldHolder,,1)
    line 72 of .cacheD..xampp.htdocs.silverstripe.sapphire.templates.TabSetFieldHolder.ss

    include(C:\Documents and Settings\admin\Local Settings\Temp\silverstripe-cacheD--xampp-htdocs-silverstripe\.cacheD..xampp.htdocs.silverstripe.sapphire.templates.TabSetFieldHolder.ss)
    line 190 of SSViewer.php

    SSViewer->process(TabSet)
    line 729 of ViewableData.php

    ViewableData->renderWith(TabSetFieldHolder)
    line 39 of TabSet.php

    TabSet->FieldHolder()

    call_user_func_array(Array,Array)
    line 376 of ViewableData.php

    ViewableData->XML_val(FieldHolder,,1)
    line 62 of .cacheD..xampp.htdocs.silverstripe.sapphire.templates.Includes.Form.ss

    include(C:\Documents and Settings\admin\Local Settings\Temp\silverstripe-cacheD--xampp-htdocs-silverstripe\.cacheD..xampp.htdocs.silverstripe.sapphire.templates.Includes.Form.ss)
    line 190 of SSViewer.php

    SSViewer->process(Form)
    line 729 of ViewableData.php

    ViewableData->renderWith(Form)
    line 601 of Form.php

    Form->forTemplate()
    line 392 of ViewableData.php

    ViewableData->XML_val(EditForm,,1)
    line 9 of .cacheD..xampp.htdocs.silverstripe.cms.templates.Includes.ReportAdmin_right.ss

    include(C:\Documents and Settings\admin\Local Settings\Temp\silverstripe-cacheD--xampp-htdocs-silverstripe\.cacheD..xampp.htdocs.silverstripe.cms.templates.Includes.ReportAdmin_right.ss)
    line 190 of SSViewer.php

    SSViewer->process(ReportAdmin)
    line 729 of ViewableData.php

    ViewableData->renderWith(Array)
    line 345 of LeftAndMain.php

    LeftAndMain->Right()

    call_user_func_array(Array,Array)
    line 376 of ViewableData.php

    ViewableData->XML_val(Right,,1)
    line 96 of .cacheD..xampp.htdocs.silverstripe.cms.templates.LeftAndMain.ss

    include(C:\Documents and Settings\admin\Local Settings\Temp\silverstripe-cacheD--xampp-htdocs-silverstripe\.cacheD..xampp.htdocs.silverstripe.cms.templates.LeftAndMain.ss)
    line 190 of SSViewer.php

    SSViewer->process(ReportAdmin)
    line 245 of Controller.php

    Controller->defaultAction(index,Array)
    line 216 of Controller.php

    Controller->run(Array)
    line 76 of Director.php

    Director::direct(/admin/reports/)
    line 104 of main.php
    Context
    Debug (Debug::showError() in line 149 of Debug.php)

    * class =

    * module =

  • Jez
    avatar
    Core Development Team
    26 posts
    1 SilverStripe Site

    Re: FATAL ERROR: i18n::include_by_class: Class not found Link to this post

    I'm getting a similar error when I tried creating a Homepage.ss that included some i18n.

    Upon closer inspection the call to the Director::makeRelative method on line 936 of i18n.php is being passed an array, but after looking at the makeRelative method, I concluded that it should be passed strings, not arrays.

    So this is as far as I got:

    Line 936 fo i18n.php:


       $path = str_replace('\\','/',Director::makeRelative(current($_TEMPLATE_MANIFEST[substr($name,0,-3)])));

    My guess is that $_TEMPLATE_MANIFEST is a multi-dimensional array, but somone thought it would always be a 1-D array when passed in this function.

    Could someone take a look at this? Sam? Ingo?

  • Ingo
    avatar
    Core Development Team
    379 posts

    Re: FATAL ERROR: i18n::include_by_class: Class not found Link to this post

    might be related to http://open.silverstripe.com/ticket/2400 ?
    i've checked out ecommerce trunk with silverstripe trunk, was able to view an (albeit empty) order report fine (had to fix some php notices though...).
    can you please give us the specific (ajax-)URL you're calling, and which module versions you're using?

  • Psykick
    Psykick's avatar
    Community Member
    5 posts

    Re: FATAL ERROR: i18n::include_by_class: Class not found Link to this post

    I'm using silverstripe-2.2.2 and ecommerce-0.5.2 and I'm also experiencing this error. All I have done thus far is written a very simple function to return a dataobject of products and told it to render the results with the same template that productgroup.ss uses and I get i18n::include_by_class errors.

    Is there a fix for this yet?

  • Psykick
    Psykick's avatar
    Community Member
    5 posts

    Re: FATAL ERROR: i18n::include_by_class: Class not found Link to this post

    Ok guys,

    Here's a question for you. Where the heck is $module coming from on line 937 of i18n.php??

  • Jez
    avatar
    Core Development Team
    26 posts
    1 SilverStripe Site

    Re: FATAL ERROR: i18n::include_by_class: Class not found Link to this post

    $module is populated by the eregs function. See http://php.net/manual/en/function.ereg.php

    The trouble is that the $path variable is an array, which means that $module never gets populated properly.

    Ingo: I am using SS 2.2.2 and ecommerce 0.5.2.

    I'm not calling ajax, it's just a front-end function I've made in my Homepage_Controller class to get a DataObjectSet of all the featured products.

    Last edited: 19 July 2008 at 6:00pm

  • Psykick
    Psykick's avatar
    Community Member
    5 posts

    Re: FATAL ERROR: i18n::include_by_class: Class not found Link to this post

    I am attempting to rework the get_owner_function to take into account multi-dimensional arrays as well as strings, but my biggest concern is not knowing how my code modifications will affect the way SS operates. I guess some trial and error is in order :)

  • Jez
    avatar
    Core Development Team
    26 posts
    1 SilverStripe Site

    Re: FATAL ERROR: i18n::include_by_class: Class not found Link to this post

    Cool, let us know how you get on.

    1454 views
go to top Reply

Currently Online:

François, snyhof

Welcome to our latest member: lorem