WCF icon indicating copy to clipboard operation
WCF copied to clipboard

Template listeners targeting shared templates are semi broken

Open dtdesign opened this issue 3 months ago • 0 comments

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.

dtdesign avatar Sep 17 '25 15:09 dtdesign