Project

General

Profile

Bug(バグ) #4508

メンバー画面にて「フレンドを招待する」より招待を行うとサーバエラーが発生する

Added by kaoru n about 1 year ago. Updated 10 months ago.

Status:
Fixed(完了)
Priority:
Normal(通常)
Assignee:
Target version:
Start date:
2021-07-09
Due date:
% Done:

100%

3.6 で発生するか:
Unknown (未調査)
3.8 で発生するか:
Yes (はい)

Description

Overview (現象)

http://sns.openpne.jp/communityTopic/712 より

友人を招待すると
「現在、サーバが混み合っているか、メンテナンス中です。
ご迷惑をおかけいたしますが、しばらく時間を空けて再度アクセスしてください。」
の画面になります。
招待メールは正常に送信されています。
インストール直後、何のプラグインも追加していない状態で再現します。

・OpenPNEのバージョン
OpenPNE 3.8.39
OpenPNE 3.10.4
どちらでも全く同じです。

・運用環境
[さくら VPS(CentOS 6.9)]

・使用ソフトのバージョン
[PHP 5.6.40 MySQL 5.7.34]

・OpenPNE上に表示されている URL
[ https://xxxxxxx/invite ]
デモサイト https://demo.openpne.jp/ ででも発生しました。

・エラーメッセージコピペ
ssl_error_log
You must specify the value to findOneBy, referer: https://xxxxxxxxxxx/invite

pc_frontend_dev.php より

500 | Internal Server Error | Doctrine_Table_Exception
You must specify the value to findOneBy
stack trace
at ()
in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Table.php line 2934 ...

if (isset($by)) {

if ( ! isset($arguments[0])) {

throw new Doctrine_Table_Exception('You must specify the value to ' . $method);

}

$fieldName = $this->_resolveFindByFieldName($by);
at Doctrine_Table->__call('findOneByMemberIdAndName', array(null, 'notification_center'))
in SF_ROOT_DIR/lib/util/opNotificationCenter.class.php line 104 ...
at MemberConfigTable->findOneByMemberIdAndName(null, 'notification_center')
in SF_ROOT_DIR/lib/util/opNotificationCenter.class.php line 104 ...
at opNotificationCenter::getNotifications(object('Member'))
in SF_ROOT_DIR/lib/model/doctrine/MemberRelationship.class.php line 32 ...
at MemberRelationship->postSave(object('Doctrine_Event'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Record.php line 354 ...
at Doctrine_Record->invokeSaveHooks('post', 'save', object('Doctrine_Event'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Connection/UnitOfWork.php line 116 ...
at Doctrine_Connection_UnitOfWork->saveGraph(object('MemberRelationship'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Record.php line 1718 ...
at Doctrine_Record->save(object('opDoctrineConnectionMysql'))
in SF_ROOT_DIR/lib/util/opDoctrineRecord.class.php line 66 ...
at opDoctrineRecord->save()
in SF_ROOT_DIR/lib/model/doctrine/MemberRelationship.class.php line 103 ...
at MemberRelationship->removeFriendPre()
in SF_ROOT_DIR/lib/model/doctrine/MemberRelationship.class.php line 82 ...
at MemberRelationship->setFriend()
in SF_ROOT_DIR/lib/form/doctrine/InviteForm.class.php line 163 ...
at InviteForm->save()
in SF_ROOT_DIR/lib/action/opMemberAction.class.php line 381 ...
at opMemberAction->executeInvite(object('opWebRequest'))
in SF_ROOT_DIR/apps/pc_frontend/modules/member/actions/actions.class.php line 355 ...
at memberActions->executeInvite(object('opWebRequest'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/action/sfActions.class.php line 60 ...
at sfActions->execute(object('opWebRequest'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfExecutionFilter.class.php line 92 ...
at sfExecutionFilter->executeAction(object('memberActions'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfExecutionFilter.class.php line 78 ...
at sfExecutionFilter->handleAction(object('sfFilterChain'), object('memberActions'))
in SF_ROOT_DIR/lib/filter/opExecutionFilter.class.php line 162 ...
at opExecutionFilter->handleAction(object('sfFilterChain'), object('memberActions'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfExecutionFilter.class.php line 42 ...
at sfExecutionFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR/lib/filter/opEmojiFilter.class.php line 29 ...
at opEmojiFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfBasicSecurityFilter.class.php line 72 ...
at sfBasicSecurityFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR/lib/filter/opAppendXRDSHeaderFilter.class.php line 26 ...
at opAppendXRDSHeaderFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR/lib/filter/opCheckEnabledApplicationFilter.class.php line 39 ...
at opCheckEnabledApplicationFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR/lib/filter/opCacheControlFilter.class.php line 27 ...
at opCacheControlFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfRenderingFilter.class.php line 33 ...
at sfRenderingFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR/lib/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/sfController.class.php line 238 ...
at sfController->forward('member', 'invite')
in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/sfFrontWebController.class.php line 48 ...
at sfFrontWebController->dispatch()
in SF_ROOT_DIR/lib/vendor/symfony/lib/util/sfContext.class.php line 173 ...
at sfContext->dispatch()
in SF_ROOT_DIR/web/pc_frontend_dev.php line 14 ...

Causes (原因)

https://github.com/openpne/OpenPNE3/blob/master/lib/model/doctrine/MemberRelationship.class.php#L32

      $notifications = opNotificationCenter::getNotifications($this->Member);

にて、通知を行おうとするが、招待相手の Member オブジェクトはまだデータベースに未登録な状態であるため ID は null である。
そのため、
https://github.com/openpne/OpenPNE3/blob/master/lib/util/opNotificationCenter.class.php#L103-L104
    $notificationObject = Doctrine::getTable('MemberConfig')
      ->findOneByMemberIdAndName($member->getId(), 'notification_center');

にて、
You must specify the value to findOneBy

のエラーが発生する。

Way to fix (修正内容)


Subtasks

Backport(バックポート) #4514: メンバー画面にて「フレンドを招待する」より招待を行うとサーバエラーが発生するFixed(完了)kaoru n

Backport(バックポート) #4515: メンバー画面にて「フレンドを招待する」より招待を行うとサーバエラーが発生するFixed(完了)kaoru n

History

#1 Updated by kaoru n about 1 year ago

  • Status changed from Accepted(着手) to Pending Review(レビュー待ち)
  • % Done changed from 0 to 50

https://github.com/openpne/OpenPNE3/pull/640
にてプルリクエストしました。

#2 Updated by Rimpei Ogawa 10 months ago

  • Status changed from Pending Review(レビュー待ち) to Pending Testing(テスト待ち)
  • % Done changed from 50 to 70

レビューOKです。

#3 Updated by kaoru n 10 months ago

  • Status changed from Pending Testing(テスト待ち) to Fixed(完了)
  • % Done changed from 70 to 100

マージしました

Also available in: Atom PDF