Template listeners targeting shared templates are semi broken

Abierto
#6,462 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
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
20/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
php
Área
backend

Línea de trabajo

Read the issue’s description of template listeners, shared templates, and runtime embedding to understand the inconsistent behavior. The issue gives no files or tests to start from, so first locate the listener and template compilation entry points. Done would mean shared templates behave consistently across frontend and backend; the issue leaves the solution unresolved and suggests stricter rules in v7.

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

Descripción

Template listeners come with a fixed environment to target either the frontend or backend. This is a necessary step to address templates that may exist in both environments under the same name but must be targeted individually.

The problem are shared templates that exist in both environments simultaneously. As soon as these templates are embedded on runtime instead of being a static include, things start to break apart. Depending on the environment that triggered the template compilation different template listeners are being run, yielding inconsistent results.

A possible solution is the introduction of a third type of environment shared that is only valid for shared templates and at the same time is the only valid type for these kind of templates. However, this is kind of obscure and cannot be enforced in a backwards compatible fashion, making this complicated to fix. Implicitly applying template listeners on shared templates to both environments has surprising effects too.

The most likely solution is to address this in v7 by enforcing stricter rules on shared templates and for the time being accept that this is subtly broken.

Lenguaje dominante
PHP
Estrellas
248
Forks
147
Merge medio
17 min
PR fusionados (30 d)
21

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

  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 WoltLab/WCF

Todos los issues de WoltLab/WCF

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.