Nested Repeater Fields with Pagination Enabled Do Not Save Correctly
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza con el JSON de Repeater anidado proporcionado y reproduce el flujo de guardado en el backend de WordPress usando paginación en ambos campos Repeater. Compara los valores anidados antes de guardar y después de volver a abrir la página; se considera terminado cuando el contenido del Repeater interno se conserva y se muestra correctamente. En la issue no se menciona ningún archivo fuente ni ninguna prueba, por lo que localizar la ruta de guardado relevante y añadir cobertura de regresión requerirá investigar el proyecto.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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:
- Create a Repeater field (Parent Repeater).
- Inside this field, add another Repeater field (Child Repeater).
- Enable
"pagination": 1for both Repeater fields. - Add content to both fields in the WordPress backend.
- Save the post.
- 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
}
- Lenguaje dominante
- PHP
- Estrellas
- 948
- Forks
- 198
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de AdvancedCustomFields/acf
-
PHP 8.5: "Using null as an array offset" deprecation in ACF_Data::is() when rendering a block with empty data (local-meta.php is_request)Posiblemente ocupada @faisalahammad la tomó hace 5 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
AdvancedCustomFields/acf#1044 ·
-
is_preview was called incorrectly notice on every early get_field() since 6.8.10 (acf_revisions::acf_validate_post_id)Posiblemente ocupada @faisalahammad la tomó hace 5 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
AdvancedCustomFields/acf#1041 · 1 comentario ·
-
True / False ACF control bug on RTL layoutsPosiblemente ocupada @elicohenator la tomó hace 28 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
AdvancedCustomFields/acf#1038 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
AdvancedCustomFields/acf#1034 · 3 comentarios ·
-
Bug: class-acf-field-icon_picker.php calls wp_get_attachment_image_url() with string Dashicon slug, causing fatal TypeError on PHP 8+Posiblemente ocupada @antwonw la tomó hace 39 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
AdvancedCustomFields/acf#1032 · 1 comentario ·
Todos los issues de AdvancedCustomFields/acf
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
opnsense/core#11052 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
grokability/snipe-it#19857 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día