Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » FATAL ERROR: i18n::include_by_class: Class not found

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 4383 Views
  • bica
    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 =

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

    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
    Forum Moderator
    801 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
    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
    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??

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

    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.

  • Psykick
    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

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

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

    Cool, let us know how you get on.

    4383 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.