ownCloud8.2.3以降でアクティビティメールが飛ばないバグ対策¶
- 管理画面のログにこんなエラーメッセージが出ていることを確認する。
Error while running background job (class: OCA\Activity\BackgroundJob\EmailNotification, arguments: ): {"Exception":"Exception","Message":"Session has been closed - no further changes to the session are allowed","Code":0,"Trace":"#0 \/usr\/local\/owncloud\/lib\/private\/session\/memory.php(49): OC\\Session\\Memory->validateSession()\n#1 \/usr\/local\/owncloud\/lib\/private\/security\/csrf\/tokenstorage\/sessionstorage.php(63): OC\\Session\\Memory->set('requesttoken', '4EyZwbjhN+axIf0...')\n#2 \/usr\/local\/owncloud\/lib\/private\/security\/csrf\/csrftokenmanager.php(57): OC\\Security\\CSRF\\TokenStorage\\SessionStorage->setToken('4EyZwbjhN+axIf0...')\n#3 \/usr\/local\/owncloud\/lib\/public\/util.php(496): OC\\Security\\CSRF\\CsrfTokenManager->getToken()\n#4 \/usr\/local\/owncloud\/lib\/private\/template.php(75): OCP\\Util::callRegister()\n#5 \/usr\/local\/owncloud\/apps\/activity\/lib\/mailqueuehandler.php(250): OC_Template->__construct('activity', 'email.notificat...', '')\n#6 \/usr\/local\/owncloud\/apps\/activity\/lib\/backgroundjob\/emailnotification.php(134): OCA\\Activity\\MailQueueHandler->sendEmailToUser('ユーザ名', 'アクティビティ通知アドレス', 'ja', 'Asia\/Tokyo', 1458264600)\n#7 \/usr\/local\/owncloud\/apps\/activity\/lib\/backgroundjob\/emailnotification.php(94): OCA\\Activity\\BackgroundJob\\EmailNotification->runStep(500, 1458264600)\n#8 \/usr\/local\/owncloud\/lib\/private\/backgroundjob\/job.php(52): OCA\\Activity\\BackgroundJob\\EmailNotification->run(NULL)\n#9 \/usr\/local\/owncloud\/lib\/private\/backgroundjob\/timedjob.php(53): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#10 \/usr\/local\/owncloud\/cron.php(141): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#11 {main}","File":"\/usr\/local\/owncloud\/lib\/private\/session\/memory.php","Line":105}
- 下記のファイルを修正する
owncloud/apps/activity/lib/mailqueuehandler.php $alttext = new Template('activity', 'email.notification', ''); ↓ $alttext = new Template('activity', 'email.notification', '', false);
開発元によるとownCloud9.0.1で直ると明言されている。