function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Comparison operator in 'rendered' attribute of 'outputText' element causing errors

The following code is somehow causing an Internal Server Error at runtime, and is now preventing the VisualForce from successfull compiling:


<apex:outputText rendered="{!(pageCategories.size > 0)}">


Error: siteContent line 780, column 14: The value of attribute "rendered" associated with an element type "apex:outputText" must not contain the '<' character.


The variable 'pageCategories' is a List, and I am rendering this element only if the list size is greater than 0.  I realize there are other ways to achieve this, but this code has been in place since Winter '11, and only stopped working after the Winter '12 upgrade.  I would like to get to the root cause of this.



Thanks in advance for your insight.








  • Unit tests run without any errors.
  • Running the VisualForce page used to throw the Internal Server Error, but doesn't appear to anymore (without having made any modification to the page)
  • This error with the VisualForce page is causing our entire Sites website to display a '...down for maintenance' page
  • There are a number of other conditional operators used in 'rendered' attributes, but according to the compile error that I get when I attempt to save the page through the UI, the line number referenced in the error message indicates that the first instance of this issue occurs after other similar operations appear in the same code
  • The referenced line number indicates that the offending code is inside of some JavaScript
  • The referenced line number appears to be 2 off, as there is no 'rendered' attribute in the exact line
  • There is no '<' character used in what appears to be the offending code.  It is actually a '>' character




Spoke too soon:


An internal server error has occurred
An error has occurred while processing your request. The support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using! 

Error ID: 350696034-224 (-132502298)

It might be worth changing the api version  to the most recent one. I had faced a similar kind of issue which got fixed by upgrading the version,  not sure it will work for you or not.


I thought that might be a workaround too, but it throws the compile error for every API version from 20.0-23.0.  This is really agitating.  Lesson learned, test your Sites website on a sandbox prior to any release.



Have you opened a support case on this?


Yes, case #06378613 .