[pmwiki-users] quirk with nested-if

adam overton a at plus1plus1plus.org
Tue Jul 1 02:00:22 CDT 2008

ok, so i think this is the last email related to this...
here's what i'm discovering:

so, i commented out the Markup that *seemed* to be causing the problem.
reload - everything works out fine.
but now, if i add any more Markup anywhere in my config, the same  
problem arises - it doesn't matter what it is.
for instance:

	Markup("user-comment", "directives", "/\\/\\*(.*?)\\*\\//", "");
	//Markup("comment", "directives", "/\\/\\*(.*?)\\*\\//", "");

		--> this works, and the nested-if functions as desired

	Markup("user-comment", "directives", "/\\/\\*(.*?)\\*\\//", "");
	Markup("comment", "directives", "/\\/\\*(.*?)\\*\\//", "");

		--> with the 2nd identical 'comment' markup added, the nested-if +  
SiteFooter combo breaks

i wonder - is Markup adding these new definitions to an array  
somewhere? and is that array running out of space (and messin' with  
nested-if) because i've accumulated too many Markup calls in my system?


On 30 Jun 2008, at 5:16 AM, Patrick R. Michaud wrote:

> On Mon, Jun 30, 2008 at 12:48:23AM -0700, adam overton wrote:
>>    hi
>>    i'm running into an odd issue with the nested-if recipe, and  
>> wondering if
>>    there's a fix...
>>    here's the deal:
>>    let's say i have a page called Main.TestInclude with the  
>> following set of
>>    nestedIfs:
>>    (:if0 true:)
>>    (:ifA true:)
>>    (:if1 true:)
>>    if0,ifA,if1 true
>>    (:else1:)
>>    if0,ifA true if1 false
>>    (:if1end:)
>>    (:elseA:)
>>    (:if2 true:)
>>    if0,if2 true, ifA false
>>    (:else2:)
>>    if0 true, if2,ifA false
>>    (:if2end:)
>>    (:ifAend:)
>>    (:else0:)
>>    if0 false
>>    (:if0end:)
>>    if i then include it on another page, say in the WikiSandbox,
>>    using (:include UDP.TestInclude:),
>>    then it works fine, and prints out:
>>    if0,ifA,if1 true
>>    however, if i then stick (:include UDP.TestInclude:) into  
>> Site.SiteFooter,
>>    and then load any page on the site, it malfunctions and spits  
>> out onto the
>>    page part of the conditional (i.e. it doesn't execute it all):
>>    (:if1 true:)
>>    if0,ifA,if1 true
>>    (:else1:)
>>    if0,ifA true if1 false
>>    (:if1end:)
>>    is there a way to correct this?
> Could you try it at http://www.pmichaud.com/sandbox/nestedif/ 
> pmwiki.php
> and let me know if it works?  I'm adding nested if's to the core.
> Pm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080701/acacb64f/attachment-0001.html 

More information about the pmwiki-users mailing list