8.2.4 -> 9.0.3 へのアップデート時のエラー
管理画面でキャッシュをクリアし、ps_mboとps_metricsを無効にしてアップデートを実行すること。
注)ps_metricsについては、無効にしても下記エラーが発生するため、管理画面で無効にしたの上でモジュールそのものを削除、またはフォルダ名を変更して読み込まないようにすること。
/modules/ps_metrics/src/Adapter/LoggerAdapter.php line 75
Declaration of PrestaShop\Module\Ps_metrics\Adapter\LoggerAdapter::emergency
($message, array $context = [])
must be compatible with
Psr\Log\LoggerInterface::emergency(string|\Stringable $message, array $context = []): void
ps_metricsモジュールの LoggerAdapter(emergency($message, array $context = )) が古いため発生したエラー。
上記モジュールを無効にして再度アップデート。このモジュールはショップのプロセスには何も影響しないため名称変更して無効化。
$ docker exec -ti prestashop-fpm bash
# mv ps_metrics ps_metrics_disabled
メール送信エラー
This section provides a list of the most significant changes in PrestaShop 9.0.x. While this list is not exhaustive, it aims to give developers a clear overview of the important updates. If you notice any missing or incorrect information, please help...
MailerはswiftmailerからSymfony Mailerへ変更
Gmailのsmtpポートは587のままだとエラー。465に設定すると送信可。
オープン 07:25PM - 03 Aug 24 UTC
Bug
Major
Email
Regression
9.0.x
### Prerequisites
- [X] I understand and accept the project's [code of conduc… t](https://github.com/PrestaShop/PrestaShop/blob/develop/CODE_OF_CONDUCT.md).
- [X] I have already [searched in existing issues](https://github.com/PrestaShop/PrestaShop/issues?q=is%3Aissue+label%3ABug) and found no previous report of this bug.
### Describe the bug and add attachments
PS 9 implementing Symfony Mailer, PS 8 Swift Mailer.
PS1.7-PS8 with port 587 with TLS working well.
PS9 port 587 isn't working, I investigated, port 465 is working..
**If eshop owner update PrestaShop from version 8 to 9, SMTP will stop working.** (because other port definition)
Huge BC... After update will eshop owner totally lost with this.
I tested more mail providers, same problem. Not related to mail service.
There is changed connection string:
```
PS 8 connection string:
tcp://smtp.seznam.cz:587
PS 9 connection string
ssl://smtp.seznam.cz:587
```
### Expected behavior
Working same like in PS8
### Steps to reproduce
1) BO - tools - emails
2) fill SMTP credentials (TLS + port 587)
3) compare PS8 vs PS9 (PS8 will works, PS9 doesn't work)
### PrestaShop version(s) where the bug happened
9.0.0
### PHP version(s) where the bug happened
8.1+8.2+8.3
### If your bug is related to a module, specify its name and its version
_No response_
### Your company or customer's name goes here (if applicable).
https://www.openservis.cz/
Friendly URL(URL書き換え)のリセット
管理画面にブラウザからアクセスできなくなった場合、データベースでリセット
PS_REWRITING_SETTINGS( テーブルps_configuration )を検索して1から0へ変更。
キャッシュ削除
# rm -rf var/cache/*
ログイン不可
IDとパスワードは正しく、ログイン画面に戻ってきてしまう。
.htaccessファイルに以下のみを指定。
SetEnvIf X-Forwarded-Proto https HTTPS=on
下記データを一時的に無効
PS_COOKIE_CHECKIP を 0
ログインして以下手順で.htaccessを再生成
管理画面の ショップパラメータ > トラフィック & SEO に移動。
下の方にある「URLの設定」セクションで、フレンドリーURLを一度「いいえ」にして保存し、再度「はい」にして保存
メールテンプレート
themes/classic/mailsにメールテンプレートが残っている場合、ここが優先されて使用されますが、これらテンプレートは変換コマンドでは上書きされないようです。このため、このフォルダは無効にします。
# mv themes/classic/mails themes/classic/mails_backup
下記変換コマンド(または管理画面のEmail Themeから)で作成されるメールテンプレートhtml.txtファイルは、mails/en, mails/ja ディレクトリに保存されます。
# bin/console prestashop:mail:generate -o true classic en-US
# bin/console prestashop:mail:generate -o true classic ja-JP
メールテンプレートについては以下も参照。
E-Mailテンプレートの編集
ModernよりもClassicテーマの方がレイアウトが整然としていて見やすいです。
メールで使用される各テンプレートは、テーマ毎 (Modern, Classic) に mails/themes に纏められています。
mails/themes フォルダ内の各テーマの twig ファイルから、html または txt 形式のファイルが作成されます(この作成…