EC-CUBE / EC-CUBE/ec-cube

Plugin有効・無効・アンインストール時のキャッシュ問題

Open
#3,957 3 comments 0 reactions 0 assignees View on GitHub
bug:Middle Status: needs-review
Dominant language
PHP
Stars
788
Forks
719
Avg merge
4d 4h
Merged PRs (30d)
39

Description

## 概要(Overview)

sample-payment-pluginインストールして有効になってから、無効にすると、下記のFatal errorが表示されることがあります。

Fatal error: require(): Failed opening required 'C:\xxxxxxxxxxxx\ec-cube4\var\cache\prod/doctrine/orm/Proxies\__CG__EccubeEntityMasterWork.php'

環境によってたまに発生しますが、弊社のPHP-FPMの環境ではほぼ80%発生します。
Cache clearはRedirectResponse送信後発生していますので、Cache clearしている間に、
/store/pluginがアクセスされてエラーとなったようです。下記のように
リダイレクト時0.5sを待てばエラーが解消になりました

```
$response = new Response();
$response->headers->set( "Refresh", "0.5; url=" . $this->generateUrl('admin_store_plugin', array()), true);
$response->setStatusCode(302);
```

## 期待する内容(Expect) or 要望 (Requirement)
Symfonyのキャッシュの仕組みを改善
または
PluginControllerでキャッシュクリア完了後にリダイレクト指示を送信
(無理の場合はヘッダーやJavascirptで少し遅延してからアクセス)

## 再現手順(Procedure)
Pluginを無効化時、別タブで/store/pluginを表示させる(複数同時やると再現しやすい)

### 環境 (environment)
+ EC-CUBE: 4.x.x
+ PHP: 7.1/7.2

## 関連情報 (Ref)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.