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
Danny@ReachLocalDanny@ReachLocal 

VF matching end-tag error

so i'm trying to create a VF Email template (language is in german) and continue to get the following error message:

The element type "messaging:plaintextemailbody" must be terminated by the matching end-tag "</messaging:plaintextemailbody>".

 

below is what is written:

 

<messaging:emailTemplate subject="Ticket gelöst - Ihr Feedback ist uns wichtig" recipientType="Contact" relatedToType="Case">
<messaging:plainTextEmailBody >
<style type="text/css">
   body {
   font-family: Arial;
   font-size: 12px;
   }
</style>
<c:CoBrandHeaderImage recipientId="{!recipient.Id}"/>

<p>Sehr geehrte(r) {!recipient.FirstName}, </p></br>
 </br>
Sie haben sich vor kurzem mit einem Anliegen an unser Support-Team gewandt. </br>
 <br/></br>
Jetzt würden wir Sie gern einladen, zu diesem Thema an einer kleinen Umfrage teilzunehmen. </br>
 <br/></br>
Hier noch einmal die entsprechenden Daten:  <br/> </br><br/> </br>
<strong>Ticketnummer:</strong> {!relatedTo.CaseNumber}<br/> </br>
<strong>Inserent:</strong> {!relatedTo.Account__c}<br/> </br>
<strong>Kampagne:</strong> {!relatedTo.Primary_CID__c} {!relatedTo.Campaign_Name__c}<br/> </br>
<strong>Art des Problems:</strong> {!relatedTo.Issue_Type__c} / {!relatedTo.Sub_Issue_Type__c}<br/> </br>
<strong>Betreff:</strong> {!relatedTo.Subject} <br/> </br>
<strong>Sales-Support-Analyst:</strong> {!relatedTo.ResolvedBy__r.FirstName} {!relatedTo.ResolvedBy__r.LastName}<br/> </br><br/> </br>
Kundenzufriedenheit ist unser oberstes Ziel.    <br/>
Wenn Sie sich die Zeit nehmen könnten, diesen Fragebogen auszufüllen,   <br/>
würden wir uns sehr über Ihr Feedback freuen. <br/>
Hier geht es zur Umfrage.   <br/>
<a href="http://www.surveymonkey.com/s/R9BZ86G">Please click here for the survey.</a></p><br/>
<p>

Mit freundlichen Grüßen<br/>
Ihr Team Support/Kampagnen-Performance&nbsp;<br/>
<c:CoBrandName recipientId="{!recipient.Id}"/>
</p>

</messaging:plainTextEmailBody>
</messaging:emailTemplate>

 

 

----The end tag seems to be there, don't know why the error message keeps popping up when trying to save.  If anyone has any suggestions, would be appreciated.

Best Answer chosen by Admin (Salesforce Developers) 
jwetzlerjwetzler

you still have all sorts of close br tags without corresponding opening ones.  Almost every line ends with <br/></br>.  The first tag, <br/> is a self closing tag.  The second, </br> is a close tag without an open tag.  I count at least 17 of them.

All Answers

jwetzlerjwetzler

Well I think it's getting confused by all of the start and end tags you have that aren't matching up.  It looks like it starts at this line:

<p>Sehr geehrte(r) {!recipient.FirstName}, </p></br>

 

Where you have a closing </br> tag but no open tag.  In fact you have a lot of closing br tags without the open tag.  As well as a closing </p> tag with no open <p> tag here:

<a href="http://www.surveymonkey.com/s/R9BZ86G">Please click here for the survey.</a></p><br/>

 

If you fix up all of those that error should go away.

Danny@ReachLocalDanny@ReachLocal

Thanks, I cleaned up the script but still getting the same error (changed from plaintextemailbody to htmlemailbody though)....I went through and made sure the end tags matched up with the start tags....appreciate the help.

 

<messaging:emailTemplate subject="Ticket gelöst - Ihr Feedback ist uns wichtig" recipientType="Contact" relatedToType="Case">
<messaging:htmlEmailBody >
<style type="text/css">
   body {
   font-family: Arial;
   font-size: 12px;
   }
</style>
<c:CoBrandHeaderImage recipientId="{!recipient.Id}"/>

<p>Sehr geehrte(r) {!recipient.FirstName}, </p><br/>
 </br>
Sie haben sich vor kurzem mit einem Anliegen an unser Support-Team gewandt. <br/></br>
Jetzt würden wir Sie gern einladen, zu diesem Thema an einer kleinen Umfrage teilzunehmen. <br/></br>
Hier noch einmal die entsprechenden Daten:  <br/></br>
<strong>Ticketnummer:</strong> {!relatedTo.CaseNumber}<br/> </br>
<strong>Inserent:</strong> {!relatedTo.Account__c}<br/> </br>
<strong>Kampagne:</strong> {!relatedTo.Primary_CID__c} {!relatedTo.Campaign_Name__c}<br/> </br>
<strong>Art des Problems:</strong> {!relatedTo.Issue_Type__c} / {!relatedTo.Sub_Issue_Type__c}<br/> </br>
<strong>Betreff:</strong> {!relatedTo.Subject} <br/> </br>
<strong>Sales-Support-Analyst:</strong> {!relatedTo.ResolvedBy__r.FirstName} {!relatedTo.ResolvedBy__r.LastName}<br/> </br><br/> </br>
Kundenzufriedenheit ist unser oberstes Ziel.    <br/></br>
Wenn Sie sich die Zeit nehmen könnten, diesen Fragebogen auszufüllen,   <br/></br>
würden wir uns sehr über Ihr Feedback freuen. <br/></br>
Hier geht es zur Umfrage.   <br/> </br>
<a href="http://www.surveymonkey.com/s/R9BZ86G">Please click here for the survey.</a>
<p>

Mit freundlichen Grüßen<br/></br>
Ihr Team Support/Kampagnen-Performance&nbsp;<br/></br>
<c:CoBrandName recipientId="{!recipient.Id}"/>
</p>

</messaging:htmlEmailBody>
</messaging:emailTemplate>

jwetzlerjwetzler

you still have all sorts of close br tags without corresponding opening ones.  Almost every line ends with <br/></br>.  The first tag, <br/> is a self closing tag.  The second, </br> is a close tag without an open tag.  I count at least 17 of them.

This was selected as the best answer