Symfony,在远程主机中:错误 500。“sfGuardUser”上的未知记录属性/相关组件“算法”

问题描述 投票:0回答:1

部署后,登录后出现以下错误。

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

4 月 15 日 07:15:23 symfony [信息] {sfPatternRouting} 连接 sfRoute “sf_guard_signin”(/登录)4 月 15 日 07:15:23 symfony [信息] {sfPatternRouting} 连接 sfRoute “sf_guard_signout”(/logout)4 月 15 日 07:15:23 symfony [信息] {sfPatternRouting} 连接 sfRoute “sf_guard_密码” (/request_password) 4 月 15 日 07:15:23 symfony [信息] {sfPatternRouting} 匹配路由“sf_guard_signin”(/login) 对于带有参数数组的 /login ( '模块' => 'sfGuardAuth', '操作' => '登录',) abr 15 07:15:23 symfony [info] {sfFilterChain} 正在执行 过滤器“sfRenderingFilter”abr 15 07:15:23 symfony [信息] {sfFilterChain} 执行过滤器 “sfCommonFilter” abr 15 07:15:23 symfony [信息] {sfFilterChain} 执行过滤器“sfExecutionFilter” abr 15 07:15:23 symfony [信息] {sfGuardAuthActions} 调用 “sfGuardAuthActions->executeSignin()” abr 15 07:15:23 symfony [信息] {Doctrine_Connection_Mysql} 执行:设置 名称 'UTF8' - () abr 15 07:15:23 交响乐团 [信息] {Doctrine_Connection_Statement} 执行:选择 s.id AS s__id, s.用户名 AS s__用户名, 南美鳅 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 - ([电子邮件受保护]) abr 15 07:15:23 symfony [错误] {Doctrine_Record_UnknownPropertyException} 未知记录属性/相关 “sfGuardUser”上的组件“算法” abr 15 07:15:23 symfony [信息] {sfWebResponse} 发送状态“HTTP/1.1 500 内部服务器错误”abr 15 07:15:23 symfony [信息] {sfWebResponse} 发送标头 “内容类型:text/html; 字符集 = utf-8" abr 15 07:15:23 symfony [信息] {sfWebDebugLogger} 配置 16.42 毫秒 (8) abr 15 07:15:23 symfony [信息] {sfWebDebugLogger} 工厂 123.17 毫秒 (1) abr 15 07:15:23 symfony [信息] {sfWebDebugLogger} 操作 “sfGuardAuth/登录”211.86 毫秒 (1) abr 15 07:15:23 symfony [信息] {sfWebDebugLogger} 数据库(学说) 0.01 毫秒 (2)

有什么想法吗?

哈维

php doctrine symfony1
1个回答
-1
投票

如果更改字段名称,整个插件将会损坏。您将需要回滚这些更改,或者重写

$user->getId()
$user->getUsername()
等的每个调用

© www.soinside.com 2019 - 2024. All rights reserved.