hmmmm I’ve got a strange caching issue after I updated - I’m not 100% sure this was NOT happening before the update however...
I have a chunk that only logged in users are supposed to see, called from a template like this:
[[!If? &subject=`[[getGroups]]` &operator=`==` &operand=`true` &then=`[[$OncologistSearch]]`]]
The snippet is a simple thing to determine the user group [can I do this by ID somehow??]
<?php
$output = 'false';
if($modx->user->isMember(array('Canadian Medical Oncologists','Canadian Resident'))){
$output = 'true';
}
return $output;
the chunk is a simple html form:
<div id="oncologist-search" class="call-out">
<h3>Oncologist Database Search</h3>
<form name="oncologist-search" action="[[~350]]" method="post" >
<ul>
<li class="search-icon"></li>
<li class="search-terms">
<input type="text" name="name" value="" maxlength="50" class="text-input" />
</li>
<li class="search-submit">
<input type="submit" name="search-oncologists" value=" " class="submit-input" />
</li>
<li class="advanced-search">
<a href="[[~350]]" >Advanced Search</a>
</li>
</ul>
</form>
</div>
So the problem is that the chunk is getting cached along with the page, i.e. a logged in user in location A loads the page & sees the chunk, modx has then cached the page with the chunk in place. Then in location B an anonymous user loads that page, gets the cached version from modx & is able to see the chunk. They can’t do anything with it, if they try to search they get the 0401 error [which is correct] but they are not supposed to be able to even see the chunk at all!
Any thoughts on how to get around this?
-thanks
-sean