Posts saved before v0.10.0 can lose or misread saved remote data

Abierto
#879 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
php, wordpress
Área
backend, frontend

Línea de trabajo

Read issue #867 for background, then trace how saved remote data is read in the editor and in PHP. Compare the old and current formats, including custom query output and the loading case described here. Done means both sides detect old data consistently, all listed cases work, and current saved data remains unchanged.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Description

Posts saved before v0.10.0 store remote data in an older format. If such a post hasn't been saved since:

  • In the editor, saved values can show as empty until fresh data loads.
  • A text field named result is split into characters in the editor.
  • A row with fields named both result and uuid isn't converted in the editor.
  • With an object or array field named result, visitors see the saved content instead of live data.
  • Changing focus away from a query input and saving while data is still loading leaves visitors on saved content and empties the saved row values.

Impact

Narrow, and limited to these old posts. We haven't had a report of it. These were checked with hand-built data, not posts from an old install.

Notes for a fix

  • Current saved data, including output from custom queries, should keep working unchanged.
  • The editor and PHP should detect the old format the same way.
  • Keeping old values in the editor with result.result ?? result made one case worse: saving during loading lost the label and formatting on the front end.

More background is in #867.

Lenguaje dominante
PHP
Estrellas
86
Forks
14
Merge medio
1 d 5 h
PR fusionados (30 d)
23

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Automattic/remote-data-blocks

Todos los issues de Automattic/remote-data-blocks

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.