Cannot reproduce Templates not rebuilding when template mod changed to macro inside template

Jon W

Well-known member
Affected version
2.1.0 RC1
I edited a template mod that I'd made that was originally for forum_post_thread and changed it to be for helper_thread_options, which is called by forum_post_thread.

When I saved, the template for forum_post_thread didn't update and I started getting errors from the old template mod.
 
Roughly, you seem to be saying that when you change the template for a template modification, it doesn't remove it from the old template. That isn't something I can reproduce. I don't think the macro part of it is directly relevant, as the compilation of macros and directly outputtable templates is done together.

As a simple test, I had a basic template mod that inserted at the start of forum_list. I then changed it to forum_view, and it disappeared/appeared as I would expect.

The most significant point I can think of is potentially related to opcode caching, as depending on how that works, it's possible you'd be seeing the old values of templates for a time. If you can still reproduce it, check the compiled templates within internal_data to see if they appear to reflect the values that you expect.

If they don't, then I think we'll need specific reproduction steps (including whether there are customized templates involved).
 
Thanks for checking.

I'm pretty sure I've done the same sort of thing many times before and never had this problem, so I'm not sure what was different in this case. I can't replicate now either, although the internal_data files were definitely wrong and I had to manually force it to rebuild the templates to get it to fix it.
 
Back
Top Bottom