2015-01-05 32 views
0

我想在我的項目中使用可翻譯的行爲,我跟隨doc一詞如何配置和使用此行爲,但我得到此錯誤:Smfony2:嘗試使用可翻譯的行爲擴展時出現錯誤

CRITICAL - Uncaught PHP Exception ReflectionException: "Property locale does not exist" at C:\wamp\www\Symfony\vendor\gedmo\doctrine-extensions\lib\Gedmo\Translatable\TranslatableListener.php line 296

任何人都可以幫忙嗎? 感謝提前:)

編輯: 這是行296:

$reflectionProperty = $class->getProperty(self::$configurations[$this->name][$meta->name]['locale']); 
+0

你打開'config.yml'中的翻譯了嗎? –

+0

是的,我做到了。 –

+0

嘗試'var_dump''self :: $ configurations'。 –

回答

1

在我的情況下所需要的$locale場是在一個抽象的超類的實體的定義 - 這基本上是精然而,它一定不是private,但至少是protected

相關問題