10688 Posts in 2795 Topics by 1518 members
Jump to:If this is your first visit, you will need to register before you can post. However, you can browse all messages below.
| Page: 1 | go to end | Reply | |
| Author | Topic: FATAL ERROR: i18n::include_by_class: Class not found | 1454 views |

28 March 2008 at 11:40pm
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 =

16 July 2008 at 12:38pm
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:
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?

16 July 2008 at 4:57pm
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?

18 July 2008 at 2:54pm
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?

18 July 2008 at 6:02pm
Ok guys,
Here's a question for you. Where the heck is $module coming from on line 937 of i18n.php??

19 July 2008 at 5:22pm
$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

24 July 2008 at 1:06pm
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 :)

30 July 2008 at 9:21pm
Cool, let us know how you get on.
| 1454 views | |||
| go to top | Reply |