# Prestashop + Docker Upgrade : 1.7.x -\> ..... -\> 9.2

**URL:** <https://forum.ficusonline.com/t/topic/536>\
**Category:** Server\
**Created:** [2025 年 9 月 21 日午前 8:42 UTC](https://forum.ficusonline.com/t/topic/536 "2025-09-21T08:42:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)\
**Post date:** [2025 年 9 月 21 日午前 8:42 UTC](https://forum.ficusonline.com/t/topic/536/1 "2025-09-21T08:42:09Z")

</div>

1.7.xモジュールのアップデートで1 Click UpdateがUpdate Assistantへ更新されます。  
PHPバージョンは、1.7.xがサポートしているバージョン7.4を維持。

アップグレード後、以下のエラーを修正。

* * *

> ### Table ‘store.ps\_layered\_filter\_block’ doesn’t exist

テーブルを再作成

1. 管理画面で「モジュール」→「モジュールマネージャー」→ **Faceted Search (ブロックレイヤードナビゲーション)** を確認
2. 再インストール  
再インストールすると必要なテーブル (`ps_layered_filter_block` など) が自動作成されます。

* * *

> ### Argument 7 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderInvoiceAddressForViewing::\_\_construct() must be of the type string, array given, called in /var/www/html/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php on line 356

以下参照して該当ファイルのコード書換え。

> [@PrestaShop + Docker](https://forum.ficusonline.com/t/topic/380/31):
>
> Type error: Argument 7 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderInvoiceAddressForViewing::\_\_construct() must be of the type string, ar…

`store/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php`

```php
/*
        if ($address->id_state) {
            $state = new State($address->id_state);

            $stateName = $state->name;
        }
*/

        if ($address->id_state) {
            $state = new State($address->id_state);
            $langId = (int) $order->getAssociatedLanguage()->getId();

            // `name` が配列の場合、現在の言語 ID に対応する値を取得
            if (is_array($state->name)) {
                $stateName = $state->name[$langId] ?? reset($state->name);
            } else {
                $stateName = $state->name;
            }
        }

```

* * *

### overrideフォルダの旧ファイルのリネーム

バージョン1.6から引き継がれているPHPコード（クラス）を無効化するため、overrideフォルダ内のindex.phpを除く全てのPHPクラスファイルを無効化。キャッシュをクリアし、クラスへの参照を全てclassesへ移行。

```bash
$ sudo rm -r var/cache/*
$ sudo mv override/classes/xxx.php override/classes/xxx.php.bak

```

### php-fpmのベースイメージを7.4から8.1へアップグレード

[prestashop/prestashop - Docker Image](https://hub.docker.com/r/prestashop/prestashop/tags)

* * *

**ドキュメント**

> **[PrestaShop 9 Documentation](https://devdocs.prestashop-project.org/8/)**
>
> Learn how to extend, modify and test PrestaShop, create modules, themes, and more.

* * *

### E-Mail送信テスト

注文後のメール送信テストは下記テンプレートを選択して実行。

 ![Screenshot from 2025-09-27 00-15-11](https://forum.ficusonline.com/uploads/default/original/2X/4/4bdf5dddb526e29de42703590ad3d0f38e51631a.png)

* * *

### 国・地域別アクセス制限設定

 ![Screenshot from 2025-11-21 09-52-12](https://forum.ficusonline.com/uploads/default/original/2X/9/95482f1ac57dcb13008f2aa8052ec525d3c0ed00.png)

[https://www.prestashop.com/forums/topic/1073412-geolocation-ps-1788/](https://www.prestashop.com/forums/topic/1073412-geolocation-ps-1788/)

> **[MaxMind GeoIP® Databases
 | MaxMind](https://www.maxmind.com/en/geoip-databases)**
>
> IP geolocation and network data from the creator of GeoIP. Download and host
> the data locally to eliminate network latency and per-query charges.

---

<div class="post-metadata">

**Author:** ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)\
**Post date:** [2025 年 9 月 25 日午後 1:57 UTC](https://forum.ficusonline.com/t/topic/536/2 "2025-09-25T13:57:37Z")

</div>

## トラブルシュート

* * *

### 注文メール表示エラー

Emailテーマでテンプレートを上書き後発生

 ![Screenshot from 2025-09-25 16-47-21](https://forum.ficusonline.com/uploads/default/original/2X/5/54f0e525693e72cbb6c040356a0aa8dfb7f37f76.png)

テーブルセルのズレ

 ![Screenshot from 2025-09-25 20-14-03](https://forum.ficusonline.com/uploads/default/original/2X/b/bb31a4693ccfef0b732cb90f450a519affaff7cd.png)

以下の要素がそれぞれ参照ファイルにより独自のテーブルを作成しているが、テンプレートで各テーブルを完全に分離した状態で配置していない。

> {products} : mails/\_partials/order\_conf\_product\_list.tpl

> {discounts} : mails/\_partials/order\_conf\_cart\_rules.tpl

翻訳テンプレートから修正するか、言語ごとに以下のファイルを直接編集。

 ![Screenshot from 2025-09-25 14-38-43](https://forum.ficusonline.com/uploads/default/original/2X/2/297429c4d01537807091e7a3975a1d135c96a344.png)

翻訳テンプレートの以下の編集画面でテーブルの列を追加してセルをマージ、{products} {discounts} をマージしたセルへ移動。

 ![Screenshot from 2025-09-25 22-55-26](https://forum.ficusonline.com/uploads/default/original/2X/5/58ea3d6d7531b1ae485a0c97df1206ed37bca62a.png)

修正ファイル（修正箇所のみ）

`themes/classic/mails/en/order_conf.html`

```html
<table class="table table-recap" bgcolor="#ffffff"><!-- Title -->
<tbody>
<tr>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;">Reference</th>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;">Product</th>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;" width="17%">Unit price</th>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;">Quantity</th>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;" width="17%">Total price</th>
</tr>
<tr>
<th bgcolor="#fbfbfb" style="border: 1px solid #D6D4D4; background-color: #fbfbfb; color: #333; font-family: Arial; font-size: 13px; padding: 10px;" colspan="5">{products} {discounts}</th>
</tr>

```

* * *

### セラーへ新規注文メールが送信されない

モジュール専用テンプレートディレクトリ

`themes/classic/modules/ps_emailalerts/mails/en/new_order.html`

を

`themes/classic/mails/en/new_order.html`

にコピーしないとテンプレートが有効にならない。

PrestaShopの **メールテンプレート読み込み処理** は、基本的にモジュール専用のメールテンプレートをこの場所からは参照しないようです。

* * *

### Manropeフォント崩れ

> **[Manrope - Google Fonts](https://fonts.google.com/specimen/Manrope)**
>
> Manrope is an open-source modern sans-serif font family, designed by Mikhail Sharanda in 2018. In 2019, Mirko Velimirovic worked with Mikhail Sharanda to conver

[https://www.prestashop.com/forums/topic/1077642-ps-8-help-with-font-and-background-for-the-store-page/](https://www.prestashop.com/forums/topic/1077642-ps-8-help-with-font-and-background-for-the-store-page/)

一部ブラウザでフォント崩れが発生するため、デフォルトのクラッシックテーマのフォントを`Manrope`から`Arial`へ変更。

SSH接続して以下ファイルの該当箇所を変更

`themes/classic/assets/css/theme.css`

```auto
body{font-family:Arial,sans-serif; ........................

```

---

<div class="post-metadata">

**Author:** ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)\
**Post date:** [2026 年 2 月 19 日午後 2:11 UTC](https://forum.ficusonline.com/t/topic/536/3 "2026-02-19T14:11:15Z")

</div>

### 8.2.4 -＞ 9.0.3 へのアップデート時のエラー

 ![Screenshot from 2026-02-19 22-25-36](https://forum.ficusonline.com/uploads/default/original/2X/1/1fae44aa256f1c7d1582c637f659517342682fc6.png)

管理画面でキャッシュをクリアし、ps\_mboとps\_metricsを無効にしてアップデートを実行すること。

> 注）ps\_metricsについては、無効にしても下記エラーが発生するため、管理画面で無効にしたの上でモジュールそのものを削除、またはフォルダ名を変更して読み込まないようにすること。

```auto
/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 = )) が古いため発生したエラー。

上記モジュールを無効にして再度アップデート。このモジュールはショップのプロセスには何も影響しないため名称変更して無効化。

```auto
$ docker exec -ti prestashop-fpm bash
# mv ps_metrics ps_metrics_disabled

```

* * *

### メール送信エラー

> **[Mailer Migration - Changes in PrestaShop 9.0.x](https://devdocs.prestashop-project.org/9/modules/core-updates/9.0/#mailer-migration)**
>
> 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に設定すると送信可。

> <https://github.com/PrestaShop/PrestaShop/issues/36663>
>
> \### 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** )を検索して１から０へ変更。  
キャッシュ削除

```shell
# rm -rf var/cache/*

```

* * *

### ログイン不可

IDとパスワードは正しく、ログイン画面に戻ってきてしまう。

.htaccessファイルに以下のみを指定。

> SetEnvIf X-Forwarded-Proto https HTTPS=on

下記データを一時的に無効

> `PS_COOKIE_CHECKIP` を `0`

ログインして以下手順で`.htaccess`を再生成

- 管理画面の ショップパラメータ \> トラフィック & SEO に移動。
- 下の方にある「URLの設定」セクションで、フレンドリーURLを一度「いいえ」にして保存し、再度「はい」にして保存

* * *

### メールテンプレート

`themes/classic/mails`にメールテンプレートが残っている場合、ここが優先されて使用されますが、これらテンプレートは変換コマンドでは上書きされないようです。このため、このフォルダは無効にします。

```auto
# mv themes/classic/mails themes/classic/mails_backup

```

下記変換コマンド（または管理画面のEmail Themeから）で作成されるメールテンプレートhtml.txtファイルは、`mails/en, mails/ja` ディレクトリに保存されます。

```auto
# bin/console prestashop:mail:generate -o true classic en-US
# bin/console prestashop:mail:generate -o true classic ja-JP

```

メールテンプレートについては以下も参照。

> [@PrestaShop + Docker](https://forum.ficusonline.com/t/topic/380/11):
>
> E-Mailテンプレートの編集 ModernよりもClassicテーマの方がレイアウトが整然としていて見やすいです。 メールで使用される各テンプレートは、テーマ毎 (Modern, Classic) に mails/themes に纏められています。 mails/themes フォルダ内の各テーマの twig ファイルから、html または txt 形式のファイルが作成されます（この作成…

---

<div class="post-metadata">

**Author:** ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)\
**Post date:** [2026 年 3 月 23 日午前 11:31 UTC](https://forum.ficusonline.com/t/topic/536/4 "2026-03-23T11:31:43Z")

</div>

## リダイレクトループ（無限ネスト）＋クローラ攻撃系アクセス対策

### Nginxの設定変更 —\> 設定内容は未公開

### 対策ファイル追加

`override/controllers/front/AuthController.php`

```auto
<?php

class AuthController extends AuthControllerCore
{
    public function init()
    {
        parent::init();

        // backパラメータ取得
        $back = Tools::getValue('back');

        if ($back) {

            // ① 長さ制限（重要）
            if (strlen($back) > 1000) {
                $back = '';
            }

            // ② back多重ネスト検出
            if (substr_count($back, 'back=') > 1) {
                $back = '';
            }

            // ③ authenticationループ防止
            if (stripos($back, 'controller=authentication') !== false) {
                $back = '';
            }

            // ④ URLとして不正なら破棄
            if (!filter_var($back, FILTER_VALIDATE_URL)) {
                $back = '';
            }

            // 上書き
            if (empty($back)) {
                $_GET['back'] = null;
            }
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)\
**Post date:** [2026 年 10 月 23 日午前 7:31 UTC](https://forum.ficusonline.com/t/topic/536/5 "2026-10-23T07:31:05Z")

</div>

## 9.1.3 —\> 9.2

> **[PrestaShop 9.2 is available](https://build.prestashop-project.org/news/2026/prestashop-9-2-0-available/)**
>
> PrestaShop 9.2 is here, and it is a big one! 🎉 This release brings some of the most requested features of recent years straight into the platform: a native One Page Checkout module to make buying faster and smoother, an AI assistant right inside the...

> <https://github.com/PrestaShop/autoupgrade/pull/1850>
>
> | Questions | Answers
> | ------------------| ---------------------------…----------------------------
> | Description? | Adds the \`extra\_property\_definition\` registry table to the PrestaShop 9.2.0 SQL upgrade script. This ensures shops upgraded to PrestaShop 9.2.0 get the table required by the native Extra Properties feature introduced in PrestaShop/PrestaShop#41092.\<br/\>Adds the Back Office tab registration for the Extra Properties registry page introduced in PrestaShop/PrestaShop#41775. The 9.2.0 upgrade script creates the \`AdminExtraPropertyDefinitions\` tab under Advanced Parameters and relies on the existing tab helper to create the related authorization roles and copy access rights from the parent tab.
> | Type? | improvement
> | BC breaks? | no
> | Deprecations? | no
> | Fixed ticket? | Related to https://github.com/PrestaShop/PrestaShop/pull/41092 and https://github.com/PrestaShop/PrestaShop/pull/41775 and https://github.com/PrestaShop/PrestaShop/pull/41749 and https://github.com/PrestaShop/PrestaShop/pull/41806
> | Sponsor company | Kiwik
> | How to test? | Run an upgrade to PrestaShop 9.2.0 using this autoupgrade branch, (from PrestaShop 9.0.0 or above \*\*ONLY\*\*), then verify that the \`ps\_extra\_property\_definition\` table is created with the expected columns, primary key, unique key, and indexes.

Update Assistantの更新がされないため、下記最新版をダウンロードし

`Module manager ---> Upload a module`

で手動アップロード・更新。

### **Update Assistant**

v7.6.6 - by **PrestaShop**

> **[Release v7.6.6 · PrestaShop/autoupgrade](https://github.com/PrestaShop/autoupgrade/releases/tag/v7.6.6)**
>
> What's Changed
> ⬆️ Compatibility with PrestaShop 9.2.0
> 
> Prepare the module to welcome PrestaShop 9.2.0 with the integration of new hooks and feature flags.
> 
> 🧹 Technical changes
> 
> Allow the update pro...

更新後、Update Assistantの手順に従い更新（不必要なモジュールのアンインストールなど）。
