Display problems with ESI enabled modules

#1
I have display problems with some modules if they are rendered as ESI:
KO-ESI.png
This is the same module none ESI rendered and how is supposed to look:
Ok-non-ESI.png

This particular module is EU e-Privacy Directive, and it's one that you can't cache, but I found similar issues with other popular Joomla plugins like some RegularLabs: Conditional Content if used in modules with ESI rendered views, Modules Anywhere, and others.

Am I doing something wrong?
 

mistwang

LiteSpeed Staff
#2
Please save a copy the html, we need to compare the difference in the final html code, with ESI, without ESI.
Normally, ESI or not wont actually change the final output, however, there might be PHP filters changing the final output.
 
#3
IMHO I think that the cause is that is not implementing the template overrides:
Without ESI:
HTML:
<div class="uk-panel" id="module-222"><div class="plg_system_eprivacy_module"><div class="uk-position-fixed plg_system_eprivacy_message uk-position-large uk-position-bottom-center uk-overlay uk-overlay-default" style=""><div uk-grid="" class="uk-grid"><div class="uk-width-3-4@m uk-first-column">Aquesta web utilitza cookies de sessió pel seu correcte funcionament. Aquestes cookies no són cedides a tercers. En utilitzar la web en consentiu l'ús. <br>També utilitzem cookies estadístiques i en podeu consentir o revocar l'ús mitjantçant els botons següents<br> </div><div class="uk-width-1-4@m"><div class="uk-flex uk-flex-around"> <button class="plg_system_eprivacy_agreed uk-button uk-button-default uk-button-small">Accepto</button> <button class="plg_system_eprivacy_declined uk-button uk-button-danger uk-button-small">No accepto</button> </div> </div> </div> </div><div class="plg_system_eprivacy_declined uk-flex uk-flex-center uk-flex-middle@m" style="display: none;"><p> No heu acceptat cookies i algunes funcions no estaran disponibles. Si canvieu d'opinió feu clic al botó <button class="plg_system_eprivacy_reconsider uk-button uk-button-danger uk-button-small">Reconsiderar Cookies</button> </p> </div><div class="plg_system_eprivacy_accepted uk-flex uk-flex-center uk-flex-middle@m" style="display:none"><p> Heu acceptat la nostra política de cookies. Si us hi repenseu feu clic al botó <button class="plg_system_eprivacy_accepted uk-button uk-button-default uk-button-small">Esborrar Cookies</button> </p> </div> </div><div id="plg_system_eprivacy" style="display:none"></div></div>
With ESI:
HTML:
<div class="uk-panel" id="module-222"> <div class="plg_system_eprivacy_module">
<div class="plg_system_eprivacy_message" style="">
<p>Aquesta web utilitza cookies de sessió pel seu correcte funcionament. Aquestes cookies no són cedides a tercers. En utilitzar la web en consentiu l'ús. <br>També utilitzem cookies estadístiques i en podeu consentir o revocar l'ús mitjantçant els botons següents<br></p>
<p><a href="/avís-legal" target="_blank">Informació de les cookies utilitzades</a></p>
<div class="cookietable">
<table>
<thead>
<tr>
<th><input type="checkbox" value="0" class="cookiesAll"></th>
<th>Cookie Name</th>
<th>Domain</th>
<th>Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<button class="plg_system_eprivacy_agreed">Accepto</button>
<button class="plg_system_eprivacy_declined">No accepto</button>
</div>
<div class="plg_system_eprivacy_declined" style="display: none;">
<p>
<button class="plg_system_eprivacy_reconsider">Reconsiderar Cookies</button>
No heu acceptat cookies i algunes funcions no estaran disponibles. Si canvieu d'opinió feu clic al botó </p>
</div>
<div class="plg_system_eprivacy_accepted" style="display:none">
<p>
<button class="plg_system_eprivacy_reconsider">Change Cookie Consent</button>
<button class="plg_system_eprivacy_accepted">Esborrar Cookies</button>
Heu acceptat la nostra política de cookies. Si us hi repenseu feu clic al botó </p>
</div>
</div>
<div id="plg_system_eprivacy" style="display:none"></div> </div>
I have attached the two template files in that are php in txt
 

Attachments

mistwang

LiteSpeed Staff
#4
Looks like when ESI block included, some variables was not set, so the generated output wont be exactly the same as the non-ESI output.
Since ESI block is executed as a standalone PHP request, if it has dependency on some variable created/updated by the main page or another ESI block, this will happen. And we have no good solution.
The key is to make those variables have the exact same value when the template is applied in non-ESI mode. Sometime it is possible, sometime it is not.
 
Top