Ticket #3754 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

パッケージ管理されたプラグインに対して openpne:migrate タスクを実行しようとすると中断してしまうことがある

Reported by: ebihara Assigned to: kawahara
Priority: major Milestone: OpenPNE3.0.4
Component: core Version: 3.0.x
Keywords: Cc:

Description

パッケージ管理されたプラグインに対して openpne:migrate タスクを実行しようとすると、 The "default" context does not exist. というエラーメッセージが出て処理が継続できないことがある。

Change History

03/23/09 18:48:05 changed by ebihara

  • owner changed from nobody to ebihara.
  • status changed from new to assigned.

03/23/09 18:50:43 changed by ebihara

  • component changed from 指定しない to core.

03/23/09 19:49:57 changed by ebihara

  • priority changed from critical to major.

暫定的に以下のコードを config/ProjectConfiguration.class.php に追記することで回避できます。

優先度を下げます。

if (PHP_SAPI === 'cli')
{
  $configuration = ProjectConfiguration::getApplicationConfiguration('pc_frontend', 'prod', false);
  sfContext::createInstance($configuration, 'default')->dispatch();
}

03/23/09 19:50:18 changed by ebihara

  • owner changed from ebihara to nobody.
  • status changed from assigned to new.

いったん手放します。

03/23/09 19:56:38 changed by ebihara

comment:3 で書いたコードの修正版です。出力をバッファに捨てるように修正しています。

if (PHP_SAPI === 'cli')
{
  ob_start();
  $configuration = ProjectConfiguration::getApplicationConfiguration('pc_frontend', 'prod', false);
  sfContext::createInstance($configuration, 'default')->dispatch();
  ob_end_clean();
}

04/09/09 17:36:00 changed by kawahara

  • owner changed from nobody to kawahara.
  • status changed from new to assigned.

04/09/09 17:44:33 changed by kawahara

  • keywords set to 確認中.

r11257

opPuginのインスタンス生成時にdispacherを受け付けるようにして、受け付けた場合にはsfContextを利用しないように変更しました。

04/17/09 12:57:09 changed by ebihara

  • keywords deleted.
  • status changed from assigned to closed.
  • resolution set to fixed.