Developer forum

Forum » CMS - Standard features » If Not bug?
Nuno Aguiar
Reply

Hi

 

I think there's a bug in the If Not Processing with && and || operators.

 

 

Consider the following:

<!--@If(DwDate.Day!='55' && DwDate.Year!='2055')-->
    Condition is met
<!--@Else-->
    Else text
<!--@EndIf-->

 

Now if you simply place the 'NOT' condition

<!--@If Not(DwDate.Day!='55' && DwDate.Year!='2055')-->
    Condition is met
<!--@Else-->
    Else text
<!--@EndIf-->

 

 

We should get the Else resolution, but instead, we always get the If resolution sad

(Using 8.3.1.9)

 

Best Regards,

Nuno


Replies

 
Mikkel Ricky
Reply
This post has been marked as an answer

This is indeed a bug, and I've created TFS Item #14197 for it.

The workaround for now is to negate the condition (DwDate.Day=='55' || DwDate.Year=='2055') – or use a Razor template.

Best regards,
Mikkel

Votes for this answer: 1
 
Nuno Aguiar
Reply

Hi Mikkel,

 

Thanks

 

You must be logged in to post in the forum