Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

provideI18nEntities() hardly(!) working in 3.0?

Go to End



Forum Moderator, 1377 Posts

4 July 2012 at 3:37am

Edited: 04/07/2012 3:38am

Normally I'd use the provideI18nEntities::provideI18nEntities() method to offer translations to the TextCollector that cannot otherwise be picked up from a _t() function in a class. But it looks like in 3.0 the TextCollector almost never gets there:

in i18nTextCollector line 399: class_exists($class, false) seems to almost(!) always return false on my module classes. (only a SiteConfig decorator returns true). It states:

// Not all classes can be instanciated without mandatory arguments,
// so entity collection doesn't work for all SilverStripe classes currently
// Requires PHP 5.1+

But shouldn't class_exists(...) return true on existing classes anyway? Can anyone reproduce this?