<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Thank you, it spits out:</div><div class=""><br class=""></div><div class=""><span style="color: rgb(24, 24, 24); font-family: 'Liberation sans', Verdana, Arial, Helvetica, sans-serif; line-height: 15px;" class="">(:if exists Profile-Data.{Members/Hosts$:201504} :) [...] (:else:) [...] (:if:)</span></div><div class=""><span style="color: rgb(24, 24, 24); font-family: 'Liberation sans', Verdana, Arial, Helvetica, sans-serif; line-height: 15px;" class=""><br class=""></span></div><div class=""><span style="color: rgb(24, 24, 24); font-family: 'Liberation sans', Verdana, Arial, Helvetica, sans-serif; line-height: 15px;" class="">So the PTV does not appear to have been processed yet -- the markup expression has, though.  And this goes for ALL the PTVs throughout the entire IF condition, including the ones I've redacted with [...]</span></div><div class=""><span style="color: rgb(24, 24, 24); font-family: 'Liberation sans', Verdana, Arial, Helvetica, sans-serif; line-height: 15px;" class=""><br class=""></span></div><div class=""><span style="color: rgb(24, 24, 24); font-family: 'Liberation sans', Verdana, Arial, Helvetica, sans-serif; line-height: 15px;" class="">However this violates documentation:</span></div><div class=""><span style="color: rgb(24, 24, 24); font-family: 'Liberation sans', Verdana, Arial, Helvetica, sans-serif; line-height: 15px;" class=""><br class=""></span></div><div class=""><h3 style="margin-top: 1em; margin-bottom: 0.6em; font-weight: normal; font-size: 1.22em; font-family: Arial, Helvetica, sans-serif; line-height: 19.50666618347168px;" class="">Use page text variables in <a class="wikilink" href="http://www.pmwiki.org/wiki/PmWiki/ConditionalMarkup">conditional markup</a></h3><div style="margin-top: 0px; margin-bottom: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 19.50666618347168px;" class="">Page text variables will be assigned/evaluated <strong class="">before</strong> any conditional markup is evaluated. This effectively means that you cannot declare a PTV within an if...else condition; and also that a PTV will have a value even if it is set within a <code class="escaped" style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier, monospace; white-space: nowrap;">(:if false:)....(:if:)</code> condition.</div></div><div class=""><br class=""></div><div class="">on page</div><div class=""><a href="http://www.pmwiki.org/wiki/PmWiki/PageTextVariables" class="">http://www.pmwiki.org/wiki/PmWiki/PageTextVariables</a></div><div class=""><br class=""></div><div class="">I upgraded to the latest version and it still doesn't work.  I turned off each recipe and commented out sections of code that even vaguely might affect conditional processing or PTV evaluation one at a time (it's a live site), and no change.  I did not comment out authentication, captcha or PmForm, since these would break the site in a very bad way and are released by PM & Petko.</div><div class=""><br class=""></div><div class="">Just for giggles, to take the complexity out of the if-conditional, I even tried:</div><div class=""><br class=""></div><div class=""><div class="">TempVar:Profile-Data.{Members/Hosts$:{(ftime "%Y%m")}}</div><div class=""><br class=""></div><div class="">(:if exists {$:TempVar} :)</div></div><div class=""><br class=""></div><div class="">But of course, that failed too.  But the variable itself is set correctly.</div><div class=""><br class=""></div><div class="">This fails too, whether I use the full expression, or the new variable:</div><div class=""><br class=""></div><div class="">(:if equal "{$:TempVar}" "Profile-Data.HEdelman" :)  </div><div class="">revealing the if conditional before it processes:</div><div class=""><span style="color: rgb(24, 24, 24); font-family: 'Liberation sans', Verdana, Arial, Helvetica, sans-serif; line-height: 15px;" class="">(:if equal "Profile-Data.{Members/Hosts$:201504}" "Profile-Data.HEdelman" :)</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="">(:if false:)</div><div class="">TempVar:Profile-Data.{Members/Hosts$:{(ftime "%Y%m")}}</div><div class="">(:if:)</div></div><div class=""><br class=""></div><div class="">Still sets the variable.</div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 1, 2015, at 8:25 PM, John Rankin <<a href="mailto:john.rankin@affinity.co.nz" class="">john.rankin@affinity.co.nz</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type" class="">
  
  <div bgcolor="#FFFFFF" text="#000000" class="">
    It may be possible to intercept the if code and find out what
    condition pmwiki is evaluating, which should give information about
    what is happening. Try this in local/config.php:<br class="">
    <br class="">
    $CondTextReplacement = "MyTempRepl(\$pagename, \$m[0], \$m[1])";<br class="">
    function MyTempRepl($pagename, $text, $code='') {<br class="">
      echo $text;<br class="">
      return CondText2($pagename, $text, $code);<br class="">
    }<br class="">
    <br class="">
    If I am reading stdmarkup.php correctly, this should echo the
    contents of the if code at the time the conditional is evaluated,
    which will show whether the var has been evaluated as intended.<br class="">
    <br class="">
    JR<br class="">
    <br class="">
    <div class="moz-cite-prefix">On 2/04/15 12:07 AM, Criss Ittermann
      wrote:<br class="">
    </div>
    <blockquote cite="mid:C0D32FC7-E5AF-4212-BE1F-19340240063B@kinhost.org" type="cite" class="">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252" class="">
      <div class="">I'm trying to figure out why this is returning false
        ("To be announced."):</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <div class="">(:if exists Profile-Data.{Members/Hosts$:{(ftime
          "%Y%m")}} :)</div>
        <div class="">...</div>
        <div class="">(:else:)</div>
        <div class="">To be announced.</div>
        <div class="">(:ifend:)</div>
        <div class=""><br class="">
        </div>
        <div class=""><br class="">
        </div>
        <div class="">When the following returns a fully functioning
          link to the correct page, which exists:</div>
        <div class=""><br class="">
        </div>
        <div class="">[[Profile-Data.{Members/Hosts$:{(ftime "%Y%m")}}]]</div>
      </div>
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
      </div>
      <div class="">What am I doing wrong?</div>
      <br class="">
      <div apple-content-edited="true" class=""><div style="margin: 0px;" class=""><font style="font: 12.0px Comic Sans MS" class="" face="Comic Sans
            MS" size="3">Crisses</font></div><div style="margin: 0px;" class=""><br class="">
        </div>
      </div>
      <br class="">
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br class="">
      <pre wrap="" class="">_______________________________________________
pmwiki-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a>
<a class="moz-txt-link-freetext" href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a>
</pre>
    </blockquote>
    <br class="">
    <pre class="moz-signature" cols="72">-- 
John Rankin
Affinity Limited
T +64 4 495 3737
M +64 21 726 546</pre>
  </div>

_______________________________________________<br class="">pmwiki-users mailing list<br class=""><a href="mailto:pmwiki-users@pmichaud.com" class="">pmwiki-users@pmichaud.com</a><br class=""><a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" class="">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br class=""></div></blockquote></div><br class=""></body></html>