Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #4824 PDFのロゴ画像を空画像に変更 #4826

Merged
merged 2 commits into from
Mar 9, 2021
Merged

Conversation

tao-s
Copy link
Contributor

@tao-s tao-s commented Jan 5, 2021

概要(Overview・Refs Issue)

#4824 PDFのロゴ画像を空画像に変更。これでとりあえずそのまま使える。ロゴ画像入れたい人だけ後で変える方向で。

マイナーバージョン互換性保持のための制限事項チェックリスト

  • 既存機能の仕様変更
  • フックポイントの呼び出しタイミングの変更
  • フックポイントのパラメータの削除・データ型の変更
  • twigファイルに渡しているパラメータの削除・データ型の変更
  • Serviceクラスの公開関数の、引数の削除・データ型の変更
  • 入出力ファイル(CSVなど)のフォーマット変更

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか

@chihiro-adachi chihiro-adachi added the improvement 機能改善 label Feb 9, 2021
@chihiro-adachi chihiro-adachi added this to the 4.0.x milestone Feb 9, 2021
@chihiro-adachi
Copy link
Contributor

@tao-s
ありがとうございます。
動作確認できましたらマージします。

@chihiro-adachi chihiro-adachi self-assigned this Feb 9, 2021
@okazy
Copy link
Contributor

okazy commented Mar 8, 2021

キャッシュが残っているのか、手元の環境でロゴの変更ができませんでした。
考えられる原因があれば教えてください。

変更前

image

image

変更後

image

image

@tao-s
Copy link
Contributor Author

tao-s commented Mar 8, 2021

@okazy キャッシュクリアしてもなりますか?

@tao-s
Copy link
Contributor Author

tao-s commented Mar 8, 2021

@okazy ユーザ領域にロゴ画像生成されていませんかね?

// user_dataにlogo.pngが配置されている場合は優先的に読み込む

@okazy
Copy link
Contributor

okazy commented Mar 8, 2021

@tao-s

html/user_data/assets/pdf/logo.png を削除すればいけました!

image

html/user_data/assets/pdf/logo.png も白い画像に差し替えた方が良いかと思いましたがいかがでしょうか?

@tao-s
Copy link
Contributor Author

tao-s commented Mar 8, 2021

@okazy html/user_data/assets/pdf/logo.pngって最初からファイルありましたっけ?インストール時かなんかの時に自動でできた気がするんですが

@okazy
Copy link
Contributor

okazy commented Mar 8, 2021

@tao-s

ありがとうございます!
確かにインストール時に展開処理が入っていました。
インストール後のブランチを切り替えてテストをしてたためうまくいっていませんでした。

$logoPath = '/assets/pdf/logo.png';
if (!file_exists($this->getParameter('eccube_html_dir').'/user_data'.$logoPath)) {
$file = new Filesystem();
$file->copy(
$this->getParameter('eccube_html_admin_dir').$logoPath,
$this->getParameter('eccube_html_dir').'/user_data'.$logoPath
);
}

$logoPath = '/assets/pdf/logo.png';
if (!file_exists($this->container->getParameter('eccube_html_dir').'/user_data'.$logoPath)) {
$file = new Filesystem();
$file->copy(
$this->container->getParameter('eccube_html_admin_dir').$logoPath,
$this->container->getParameter('eccube_html_dir').'/user_data'.$logoPath
);
}

@okazy okazy modified the milestones: 4.0.x, 4.0.6 Mar 8, 2021
Copy link
Contributor

@okazy okazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

テストして問題ありませんでした。

@okazy okazy merged commit 03b58f9 into EC-CUBE:4.0 Mar 9, 2021
@okazy
Copy link
Contributor

okazy commented Mar 9, 2021

ありがとうございます!取り込みました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants