部署后,我在登录后收到以下错误。
Sf 1.3,sfDoctrineGuardPlugin。我在config / doctrine中有这个schema.yml:
Usuario:
inheritance:
extends: sfGuardUser
type: simple
columns:
username:
type: string(128)
notnull: false
unique: true
nombre_apellidos: string(60)
sexo: string(5)
fecha_nac: date
provincia: string(60)
localidad: string(255)
email_address: string(255)
fotografia: string(255)
avatar: string(255)
avatar_mensajes: string(255)
relations:
Usuario:
local: user1_id
foreign: user2_id
refClass: AmigoUsuario
equal: true
500 | Internal Server Error | Doctrine_Record_UnknownPropertyException Unknown record property / related component "algorithm" on "sfGuardUser" stack trace
* at ()
in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Record/Filter/Standard.php line 55 ...
52. */
53. public function filterGet(Doctrine_Record $record, $name)
54. {
55. throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $name, get_class($record)));
56. }
57. }
* at Doctrine_Record_Filter_Standard->filterGet(object('sfGuardUser'), 'algorithm')
in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Record.php line 1382 ...
1379. $success = false;
1380. foreach ($this->_table->getFilters() as $filter) {
1381. try {
1382. $value = $filter->filterGet($this, $fieldName);
1383. $success = true;
1384. } catch (Doctrine_Exception $e) {}
1385. }
* at Doctrine_Record->_get('algorithm', 1)
in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Record.php line 1337 ...
1334. return $this->$accessor($load);
1335. }
1336. }
1337. return $this->_get($fieldName, $load);
1338. }
1339.
1340. protected function _get($fieldName, $load = true)
* at Doctrine_Record->get('algorithm')
in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/record/sfDoctrineRecord.class.php line 212 ...
209. return call_user_func_array(
210. array($this, $verb),
211. array_merge(array($entityName), $arguments)
212. );
213. } else {
214. $failed = true;
215. }
* at sfDoctrineRecord->__call(array(object('sfGuardUser'), 'get'), array('algorithm'))
in n/a line n/a ...
* at sfGuardUser->getAlgorithm('getAlgorithm', array())
in SF_ROOT_DIR/plugins/sfDoctrineGuardPlugin/lib/model/doctrine/PluginsfGuardUser.class.php line 96 ...
93. */
94. public function checkPasswordByGuard($password)
95. {
96. $algorithm = $this->getAlgorithm();
97. if (false !== $pos = strpos($algorithm, '::'))
98. {
99. $algorithm = array(substr($algorithm, 0, $pos), substr($algorithm, $pos + 2));
* at PluginsfGuardUser->checkPasswordByGuard()
in SF_ROOT_DIR/plugins/sfDoctrineGuardPlugin/lib/model/doctrine/PluginsfGuardUser.class.php line 83 ...
80. }
81. else
82. {
83. return $this->checkPasswordByGuard($password);
84. }
85. }
86.
* at PluginsfGuardUser->checkPassword('m')
in SF_ROOT_DIR/lib/sfGuardValidatorUserByEmail.class.php line 28 ...
25. {
26. // password is ok?
27.
28. if ($user->checkPassword($password))
29. {
30.
31. //die("entro");
* at sfGuardValidatorUserByEmail->doClean('m')
这里你还有我的frontend_dev.log
Apr 15 07:15:23 symfony [info] {sfPatternRouting}连接sfRoute “sf_guard_signin”(/ login)4月15日 07:15:23 symfony [info] {sfPatternRouting}连接sfRoute “sf_guard_signout”(/ logout)4月15日 07:15:23 symfony [info] {sfPatternRouting}连接sfRoute “sf_guard_password” (/ request_password)4月15日07:15:23 symfony [info] {sfPatternRouting} 匹配路线“sf_guard_signin”(/ login) for / login with parameters array( 'module'=> 'sfGuardAuth','行动' => 'signin',)abr 15 07:15:23 symfony [info] {sfFilterChain}执行 过滤“sfRenderingFilter”abr 15 07:15:23 symfony [info] {sfFilterChain}执行过滤器 “sfCommonFilter”abr 15 07:15:23 symfony [info] {sfFilterChain} 执行过滤器“sfExecutionFilter” abr 15 07:15:23 symfony [info] {sfGuardAuthActions}致电 “sfGuardAuthActions-> executeSignin()” abr 15 07:15:23 symfony [info] {Doctrine_Connection_Mysql} exec:SET NAMES'UTF8' - ()abr 15 07:15:23 symfony [info] {} Doctrine_Connection_Statement 执行:SELECT s.id AS s__id, s.username AS s__username, s.nombre_apellidos AS s__nombre_apellidos,s.sexo AS s__sexo,s.fecha_nac AS s__fecha_nac, s.provincia AS s__provincia, s.localidad AS s__localidad, s.email_address AS s__email_address, s.fotografia AS s__fotografia, s.avatar AS s__avatar, s.avatar_mensajes AS s__avatar_mensajes来自sf_guard_user s WHERE(s.email_address =?)LIMIT 1 - (f@m.com)abr 15 07:15:23 symfony [err] {} Doctrine_Record_UnknownPropertyException 未知的记录属性/相关 “sfGuardUser”上的组件“算法” abr 15 07:15:23 symfony [info] {sfWebResponse}发送状态“HTTP / 1.1 500内部服务器错误“abr 15 07:15:23 symfony [info] {sfWebResponse}发送标头 “Content-Type:text / html; charset = utf-8“abr 15 07:15:23 symfony [info] {sfWebDebugLogger} 配置16.42 ms(8)abr 15 07:15:23 symfony [info] {sfWebDebugLogger}工厂123.17毫秒 (1)abr 15 07:15:23 symfony [info] {sfWebDebugLogger}动作 “sfGuardAuth / signin”211.86 ms(1)abr 15 07:15:23 symfony [info] {sfWebDebugLogger}数据库(学说) 0.01 ms(2)
有什么想法吗?
哈维
答案 0 :(得分:-1)
如果更改字段名称,整个插件将会中断。您需要回滚这些更改,或重写$user->getId()
,$user->getUsername()
等每次调用