プロジェクト

全般

プロフィール

Bug(バグ) #501

完了

【管理画面】プラグイン設定で未使用にしたプラグインの設定がDoctrine Relation Parserで読み込まれてエラー

Mari Yamashita さんがほぼ15年前に追加. ほぼ14年前に更新.

ステータス:
Invalid(無効)
優先度:
Normal(通常)
担当者:
-
対象バージョン:
-
開始日:
2010-01-15
期日:
進捗率:

0%

予定工数:
3.6 で発生するか:
Yes
3.8 で発生するか:

説明

opMessagePlugin、opAlbumPluginをoffにして日記の画像を削除しようと
すると下記のエラーになります。(プラグインを物理削除すると動きます)

Couldn't find class MessageFile
stack trace
at ()
in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Table.php line 290 ...

    {
        $name = $this->_options['name'];
        if ( ! class_exists($name) || empty($name)) {
            throw new Doctrine_Exception("Couldn't find class " . $name);
        }
        $record = new $name($this);
at Doctrine_Table->initDefinition()in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Table.php line 240 ...        $this->_parser = new Doctrine_Relation_Parser($this);

        if ($initDefinition) {
            $this->record = $this->initDefinition();

            $this->initIdentifier();
at Doctrine_Table->__construct('MessageFile', object('Doctrine_Connection_Mysql'), 1)in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Connection.php line 1112 ...            $table = new $class($name, $this, true);
        } else {
            $tableClass = $this->getAttribute(Doctrine::ATTR_TABLE_CLASS);
            $table = new $tableClass($name, $this, true);
        }

        return $table;at Doctrine_Connection->getTable('MessageFile')in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Relation/Parser.php line 278 ...            $impl = $template;
        }

        return $conn->getTable($impl);
    }

    /**at Doctrine_Relation_Parser->getImpl('MessageFile')in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Relation/Parser.php line 404 ...    public function completeDefinition($def)
    {
        $conn = $this->_table->getConnection();
        $def['table'] = $this->getImpl($def['class']);
        $def['localTable'] = $this->_table;
        $def['class'] = $def['table']->getComponentName();
at Doctrine_Relation_Parser->completeDefinition(array('local' => 'id', 'foreign' => 'file_id', 'type' => 1, 'class' => 'MessageFile', 'alias' => 'MessageFile'))in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Relation/Parser.php line 207 ...                }
            } else {
                // simple foreign key relation
                $def = $this->completeDefinition($def);

                if (isset($def['localKey'])) {
                    $rel = new Doctrine_Relation_LocalKey($def);at Doctrine_Relation_Parser->getRelation('MessageFile')in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Relation/Parser.php line 250 ...    public function getRelations()
    {
        foreach ($this->_pending as $k => $v) {
            $this->getRelation($k);
        }

        return $this->_relations;at Doctrine_Relation_Parser->getRelations()in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Table.php line 972 ...     */
    public function getRelations()
    {
        return $this->_parser->getRelations();
    }

    /**at Doctrine_Table->getRelations()in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Connection/UnitOfWork.php line 320 ...     */
     protected function _cascadeDelete(Doctrine_Record $record, array &$deletions)
     {
         foreach ($record->getTable()->getRelations() as $relation) {
             if ($relation->isCascadeDelete()) {
                 $fieldName = $relation->getAlias();                  // if it's a xToOne relation and the related object is already loadedat Doctrine_Connection_UnitOfWork->_cascadeDelete(object('File'), array(object('File')))in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Connection/UnitOfWork.php line 173 ...        }

        $deletions[$record->getOid()] = $record;
        $this->_cascadeDelete($record, $deletions);
    }

    /**at Doctrine_Connection_UnitOfWork->_collectDeletions(object('File'), array(object('File')))in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Connection/UnitOfWork.php line 156 ...    public function delete(Doctrine_Record $record)
    {
        $deletions = array();         $this->_collectDeletions($record, $deletions);
        return $this->_executeDeletions($deletions);
    }
at Doctrine_Connection_UnitOfWork->delete(object('File'))in SF_ROOT_DIR/lib/vendor/doctrine/Doctrine/Record.php line 2104 ...        if ($conn == null) {
            $conn = $this->_table->getConnection();
        }
        return $conn->unitOfWork->delete($this);
    }

    /**at Doctrine_Record->delete()in SF_ROOT_DIR/plugins/opDiaryPlugin/lib/form/doctrine/PluginDiaryImageForm.class.php line 68 ...    {
      if (!$this->isNew() && !empty($values['photo_delete']))
      {
        $this->getObject()->getFile()->delete();
      }

      $this->getObject()->setFile(null);at PluginDiaryImageForm->updateObject(array('photo_delete' => 1, 'id' => '2', 'photo' => null))

Kousuke Ebihara さんがほぼ15年前に更新

  • 対象バージョン を削除 (OpenPNE 3.2.0)

Target version は修正対象のバージョンになります

Kousuke Ebihara さんが14年以上前に更新

  • 3.6 で発生するかYes にセット

Masato Nagasawa さんがほぼ14年前に更新

  • ステータスNew(新規) から Invalid(無効) に変更

3.4.10-dev/3.6beta8-dev/3.7.0-dev で確認しましたが発生しませんでした。
報告時のバージョンでは、プラグイン設定時にキャッシュ削除が行われていなかったことが原因と思われます。

他の形式にエクスポート: Atom PDF