The problem is the "funding" bar at the top of the header here:
https://forum.realitymod.com/
The relevant section of the code is this, in the file styles/reality/template/overall_header.html
This is entirely based on the "Carbon" style, we simply manually changed the actual header part. The relevant statements for this issue can be found by looking for {% import 'donovalues' as dono %} and the div with id="donobar", which then uses these imported values.
Code: Select all
{$STYLESHEETS}
<!-- EVENT overall_header_stylesheets_after -->
</head>
<body id="phpbb" class="nojs notouch section-{SCRIPT_NAME} {S_CONTENT_DIRECTION} {BODY_CLASS}">
<!-- EVENT overall_header_body_before -->
<div class="carbon_wrap" id="carbon_wrap">
<a id="top" class="top-anchor" accesskey="t"></a>
{% import 'donovalues' as dono %}
<div id="pr-header-wrapper">
<div id="pr-header">
<a href="https://www.realitymod.com" title="Project Reality: Realistic Gaming Redefined"><img src="{T_THEME_PATH}/images/project-reality-header.jpg" width="980" height="195" border="0" title="Project Reality: Realistic Gaming Redefined" alt="project reality header"/></a>
</div>
<div id="buttonbar">
<div class="header-buttonspan">
<a class="menu-button" title="News" href="https://realitymod.com">NEWS</a>
<a class="menu-button" title="Forums" href="https://forum.realitymod.com" target="">FORUMS</a>
<a class="menu-button" title="Features" href="https://realitymod.com/features">FEATURES</a>
<a class="menu-button" title="Downloads" href="https://realitymod.com/downloads">DOWNLOADS</a>
<a class="menu-button" title="Media" href="https://realitymod.com/media">MEDIA</a>
<a class="menu-button" title="About" href="https://realitymod.com/about">ABOUT</a>
<a class="menu-button" title="PRSpy" href="https://prspy.realitymod.com">PRSPY</a>
<a class="menu-button" title="Stats" href="https://prstats.realitymod.com/">STATS</a>
<a class="menu-button" title="Map Gallery" href="https://realitymod.com/mapgallery">MAP GALLERY</a>
</div>
</div>
<div id="donobar">
<div style="flex-shrink: 0; margin: 0px 5px 0px 5px">Monthly Funding:</div>
<div style="width:100%; display:flex">
<div style="min-width: {dono.percentage}%; background-color:#888;"></div>
<div style="width: 100%; border: 1px solid #888;"></div>
</div>
<div style="flex-shrink: 0; margin-left: 5px; margin-right: 5px"> {dono.value} / {dono.target}$</div>
<a class="menu-button" style="height:17px;line-height:16px; color: black; background: linear-gradient(to bottom, #39C 0%, #069 100%) !important" title="Donate" href="https://www.realitymod.com/donate">DONATE</a>
</div>
</div>
Code: Select all
{% macro value() %}147.12{% endmacro %}
{% macro percentage() %}58.848{% endmacro %}
{% macro target() %}250{% endmacro %}
The issue is: When opening forum.realitymod.com for the first time or on a new browser or after hard-clearing the storage/cache (just using "disable cache" in Firefox/Chrome devtools is not enough), you see the correct values, in this case the bar is a bit over halfway full and shows the 147.12 dollars.
However, when the values in donovalues change, these changes do NOT get updated anymore, but only locally. Hard-purging the local client's cache again will then lead to the site being loaded properly.
I'm thoroughly confused and have a hard time finding info, because almost all issues with templates not updating revolve around them being stuck in cache on phpbb or Cloudflare (which we use), but given the reproduction steps, this clearly is not the case here, as it only gets stuck on clients' side.
Setting CF to "Dev Mode" and/or disabling caching there explicitly does not change the behaviour at all. Neither does purging the cache in phpBB ACP.
Any ideas on how to get browsers to treat the site as properly changed? Alternatively: Any idea on how to solve what we do (loading dynamic values into a template) in a more robust way that has no cache issues?
Extra info: we use an almost identical approach of including these values on the main homepage ( www.realitymod.com ), which uses the same header (not exactly the same files, they are copied over, because phpbb doesn't like loading "outside" files for security reasons).
The templating engine here is not twig, but Go's onboard template engine. On the homepage, the dynamic updates work just fine, despite running on the same webserver behind the same CF proxy.