Disabled Flexible Content layouts create field overrides
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Empieza reproduciendo el problema con get_field('flexible_content') llamado desde un hook init y, después, renderiza los layouts con have_rows y get_sub_field. Compara filas sucesivas de Layout 2 después de desactivar Layout 1; el trabajo estará terminado cuando los campos de título y texto vacíos sigan vacíos en lugar de heredar los valores de la fila anterior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
In a Flexible Content, when calling the field before and disabling one of the layout and if you have successive layouts with similar field names, empty fields are override by the previous layout fields content.
To Reproduce
Steps to reproduce the behavior:
- In a Flexible Content (field name
flexible_content), have at least two different layout type with optional fields :- Layout 1
- Layout 2 (optional fields: title, text)
- Add the layout in the flexible content :
- Layout 1
- Layout 2 (fill title and text fields)
- Layout 2 (let title and text empty)
- Disable Layout 1
The second Layout 2 should have the title and text of the previous one.
Before calling the Flexible Content render loop, call get_field('flexible_content') (e.g. in a init wp hook for preprocessing)
The layout are rendered in the usual have_rows loop and the layout field with get_sub_field.
Expected behavior
Layout field should not override
Version Information:
- WordPress 6.9
- PHP 8.3.0
- ACF 6.7.0.2
- Lenguaje dominante
- PHP
- Estrellas
- 946
- Forks
- 197
- 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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
AdvancedCustomFields/acf#1041 · 1 comentario ·
-
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 · 2 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
AdvancedCustomFields/acf#1032 · 1 comentario ·
-
Drop trap, acf_after_titleAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
AdvancedCustomFields/acf#1029 · 1 comentario ·
Todos los issues de AdvancedCustomFields/acf
Issues similares
-
sync-en
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug Feature: Kiosk
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Infrastructure: actions Module: zmscitizenapi Module: zmsentities php Type: Bug unit tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
it-at-m/eappointment#3480 ·
Los mantenedores suelen responder en 1 día
-
HttpClient
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
CI: composer install fails — league/flysystem 1.x blocked by security advisory GHSA-cxf4-7mrp-vvprAbiertodevops type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día