Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Nested Repeater Fields with Pagination Enabled Do Not Save Correctly

オープン
#963 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php
領域
backend

調査の方向性

提供されたネストされた Repeater JSON から始め、両方の Repeater フィールドでページネーションを使用して、WordPress バックエンドで保存フローを再現します。保存前とページを再度開いた後のネストされた値を比較します。内側の Repeater の内容が保持され、正しく表示されれば完了です。Issue ではソースファイルもテストも指定されていないため、関連する保存パスの特定と回帰テストのカバレッジ追加には、プロジェクトの調査が必要です。

索引モデルが issue の本文から書いたものです。

説明

Describe the bug
When two nested ACF fields (both of type Repeater) have the option "pagination": 1 enabled, the inner field content is no longer saved correctly. The data appears to be lost or overwritten during save.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Repeater field (Parent Repeater).
  2. Inside this field, add another Repeater field (Child Repeater).
  3. Enable "pagination": 1 for both Repeater fields.
  4. Add content to both fields in the WordPress backend.
  5. Save the post.
  6. Reopen the post and check the values — the inner Repeater content is missing or not saved correctly.

Expected behavior
The values entered in both nested Repeater fields (with pagination enabled) should be saved and displayed correctly after saving the post.

Screenshots or Video
N/A — the issue is data-related and occurs upon save.

Code
You will find attached the exported JSON of the relevant ACF field group that reproduces the issue. (Attach your JSON export when submitting the ticket.)

Version Information:

  • WordPress Version: 6.8.1
  • ACF PRO Version: 6.4.2
  • PHP Version: 8.1.x
  • Browser: Chrome (latest)

JSON:

{
    "key": "group_5e67884841724",
    "title": "Fieldgroup XYZ",
    "fields": [
        {
            "key": "field_5e67889ad8b2a",
            "label": "Flexible Content",
            "name": "flexible_content",
            "aria-label": "",
            "type": "flexible_content",
            "instructions": "",
            "required": 0,
            "conditional_logic": 0,
            "wrapper": {
                "width": "",
                "class": "",
                "id": ""
            },
            "allow_in_bindings": 0,
            "wpml_cf_preferences": 2,
            "admin_only": 0,
            "exclude_customer": 0,
            "layouts": {
                "layout_6604371afv5cd7": {
                    "key": "layout_6604371afv5cd7",
                    "name": "layout_xyz",
                    "label": "Layout XYZ",
                    "display": "block",
                    "sub_fields": [
                        {
                            "key": "field_68042e0594df7",
                            "label": "Repeater 1",
                            "name": "repeater_1",
                            "aria-label": "",
                            "type": "repeater",
                            "instructions": "",
                            "required": 0,
                            "conditional_logic": 0,
                            "wrapper": {
                                "width": "",
                                "class": "",
                                "id": ""
                            },
                            "allow_in_bindings": 0,
                            "wpml_cf_preferences": 2,
                            "admin_only": 0,
                            "exclude_customer": 0,
                            "collapsed": "",
                            "pagination": 0,
                            "min": 1,
                            "max": 0,
                            "layout": "block",
                            "button_label": "Add Item Repeater 1",
                            "rows_per_page": 20,
                            "sub_fields": [
                                {
                                    "key": "field_66265bd4e88e9",
                                    "label": "Repeater 2",
                                    "name": "repeater_2",
                                    "aria-label": "",
                                    "type": "repeater",
                                    "instructions": "",
                                    "required": 0,
                                    "conditional_logic": 0,
                                    "wrapper": {
                                        "width": "",
                                        "class": "",
                                        "id": ""
                                    },
                                    "allow_in_bindings": 0,
                                    "admin_only": 0,
                                    "exclude_customer": 0,
                                    "collapsed": "",
                                    "pagination": 0,
                                    "min": 1,
                                    "max": 10,
                                    "layout": "row",
                                    "button_label": "Add Item Repeater 2",
                                    "rows_per_page": 20,
                                    "parent_repeater": "field_68042e0594df7",
                                    "sub_fields": [
                                        {
                                            "key": "field_662b9e12d3a7f",
                                            "label": "Media-File",
                                            "name": "media_file",
                                            "aria-label": "",
                                            "type": "file",
                                            "instructions": "",
                                            "required": 1,
                                            "conditional_logic": 0,
                                            "wrapper": {
                                                "width": "50",
                                                "class": "",
                                                "id": ""
                                            },
                                            "allow_in_bindings": 0,
                                            "wpml_cf_preferences": 2,
                                            "admin_only": 0,
                                            "exclude_customer": 0,
                                            "return_format": "array",
                                            "preview_size": "thumbnail",
                                            "library": "all",
                                            "min_width": "",
                                            "min_height": "",
                                            "min_size": "",
                                            "max_width": "",
                                            "max_height": "",
                                            "max_size": "",
                                            "mime_types": "mp3",
                                            "parent_repeater": "field_66265bd4e88e9"
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "min": "",
                    "max": ""
                }
            },
            "button_label": "",
            "min": "",
            "max": ""
        }
    ],
    "location": [
        [
            {
                "param": "post_type",
                "operator": "==",
                "value": "page"
            }
        ]
    ],
    "menu_order": 1,
    "position": "normal",
    "style": "default",
    "label_placement": "top",
    "instruction_placement": "label",
    "hide_on_screen": "",
    "active": true,
    "description": "",
    "show_in_rest": 0,
    "modified": 1750158065
}
主要言語
PHP
スター
948
フォーク
198
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AdvancedCustomFields/acf のほかの issue

AdvancedCustomFields/acf の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。