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
gtuerkgtuerk 

Visualforce parsing errors thrown to screen

As of this morning, we are sometimes getting warnings added to our 'QuickView' visualforce pages that pull in information into Standard layouts.  This is happening to our sandbox on CS2.  I'm aware that the tag should be terminated.  This seems to be related to the Winter '10 upgrade...

 

WARNING

Warning:

 The element type "br" should be terminated by the matching end-tag "</br>". at line 24

 

 

Is visualforce using strict XHTML validation these days? The page tag doesn't lend itself to that

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"

 

 So why does the page (intermittently) display that html parsing warning? VF markup below (in case you care)

 

<apex:page standardController="Order_Contact_Role__c" recordSetVar="contacts"
    extensions="ContactRoleController">
    <apex:form >
        <apex:sectionHeader title="Order Contacts" />
        <apex:param id="userProfile" value="{!$Profile.Name}" />
        <apex:pageBlock title="Order Contact Selection" >
            <apex:pageMessages id="errorMessages" />
            <apex:pageBlockSection showHeader="false">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Role" />
                    <apex:selectList value="{!selectedRole}" >
                        <apex:selectOptions value="{!selectableRoles}" />
                    </apex:selectList>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Contact" />
                    <apex:selectList value="{!selectedContact}" size="5" >
                        <apex:selectOptions value="{!activeContacts}" />
                    </apex:selectList>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            <apex:pageBlockButtons >
                    <apex:commandButton value="Add Contact" action="{!addContact}"
                    rerender="errorMessages, outputSection" />
                    <apex:commandButton value="Return to SO" action="{!returnToSO}" />
                </apex:pageBlockButtons>
        </apex:pageBlock>
        <apex:pageBlock title="Current Order Contacts" >
            <apex:pageBlockSection showHeader="false" id="outputSection" columns="1">
                    <apex:pageBlockTable value="{!contacts}" var="con">
                        <apex:column value="{!con.Contact__c}" />
                        <apex:column value="{!con.Role__c}" />
                        <apex:column value="{!con.First_Name__c}" />
                        <apex:column value="{!con.Last_Name__c}" />
                    </apex:pageBlockTable>
                </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

jwetzlerjwetzler

Even though we don't use strict XHTML in the doctype, our compiler does issue a warning when you have unclosed elements on your page.  If you want to get rid of those warnings from your messages you should clean up your HTML.

 

That being said I think you may have hit an existing bug that has already been fixed and is expected to go out later this week to your sandbox instance.

 

We have an issue right now with custom components getting compiled and loaded occasionally when accessing a page, even if those custom components are not associated with the page you're currently interacting with.  In which case any compiler errors or warnings are going to populate to your page.  To get rid of this message I would look through your custom components and see if you can find the missing close tag.

 

Of course, if your page is actually referencing the component with warnings, you would see this message, but this is not new behavior.

 

So the explanation for why you are suddenly seeing this is that either you've hit the above bug, or you've referenced something that has a compiler warning (it does not appear that you have).

 

Sorry for the inconvenience.

gtuerkgtuerk
Explains the intermittent nature.  Thanks