Events - Registration Confirmation and Receipt (on-line) template fails to compile
Overview
The default Events - Registration Confirmation and Receipt (on-line)
fails to compile, giving this error:
"Syntax error in template "eval:{crmScope extensionKey=""}<!DOCTYPE html..." on line 471 "{capture assign=selfservice_preposition}{if 0 && > 0}{ts}before{/ts}{else}{ts}after{/ts}{/if}{/capture}" - Unexpected "> ""
|----------------------------------------------------------| Reproduction steps
- Attempt to register for an event.
- Enter details.
- Click on Review.
- Click on Register.
- You get an error message.
Current behaviour
This error message is generated internally, but was only visible when debugging because of Call to SmartyCompilerException fails in /vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on template compiler error.
"Syntax error in template "eval:{crmScope extensionKey=""}<!DOCTYPE html..." on line 471 "{capture assign=selfservice_preposition}{if 0 && > 0}{ts}before{/ts}{else}{ts}after{/ts}{/if}{/capture}" - Unexpected "> ""
Expected behaviour
You get a registration confirmation page.
Environment information
- Browser: MS Edge but probably irrelevant
- CiviCRM: 5.70.1
- PHP: 8.3.1_
- CMS: Drupal 10.2.3
- Database: MySQL 8.0.36 but probably irrelevant.
- Web Server: IIS but probably irrelevant.
Comments
The 'offending' code is somewhere here, I suspect (lines 461 - 471) but I haven't been able to discover it.
{if {event.allow_selfcancelxfer|boolean}}
<tr>
<td colspan="2" {$valueStyle}>
{capture assign=selfservice_preposition}{if {event.selfcancelxfer_time|boolean} && {event.selfcancelxfer_time} > 0}{ts}before{/ts}{else}{ts}after{/ts}{/if}{/capture}
{ts 1="{event.selfcancelxfer_time}" 2="$selfservice_preposition"}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts}
{if {contribution.paid_amount|boolean}}{ts}Cancellations are not refundable.{/ts}{/if}<br/>
{capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid={participant.id}&{contact.checksum}" h=0 a=1 fe=1}{/capture}
<a href="{$selfService}">{ts}Click here to transfer or cancel your registration.{/ts}</a>
</td>
</tr>
{/if}