Body: <h2>Installation Details</h2>
  <ul>
  <li>WordPress 4.7.3</li>
  <li>CiviCRM 4.7.17</li>
  <li>CiviVolunteer 4.6-2.2.1</li>
  <li>Angular Profiles 4.6-1.0.2</li>
  <li>SparkPost 1.1 (verified working)</li>
  </ul>
  <h2>Problem Description</h2>
  <p>I have a CiviEvent set up with a schedule reminder. The variables in the email template are:</p>
  <ul>
  <li>{event.title}</li>
  <li>{contact.display_name}</li>
  <li>{event.title}</li>
  <li>{event.start_date}</li>
  <li>{event.summary}</li>
  <li>{event.description}</li>
  <li>{event.info_url}</li>
  </ul>
  <p>When the cron job runs, the email is not sent and I get this error in the scheduled jobs log and no emails are sent:</p>
  <blockquote>
  <p>Parameters parsed (and passed to API method):
  a:1:{s:7:&quot;version&quot;;i:3;}</p>
  <p>Full message:
  Finished execution of Send Scheduled Reminders with result: Failure, &gt;Error message: Cannot build query. Variable &quot;@selectedValues&quot; is unknown.</p>
  </blockquote>
  <p>Any idea what is wrong and how to debug and fix it?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-21T13:57:35.243Z
Comments.Text: Updated to WP 4.7.4 and CiviCRM 4.7.18... no change. Same error.
Comments.UserDisplayName: msw
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-05T13:33:10.777Z
Comments.Text: CiviCRM 4.7.19 and the problem persists.
Comments.UserDisplayName: msw
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-22T21:10:56.757Z
Comments.Text: CiviCRM 4.7.22... stiiiiill broken
  
  Oh, and I have removed CiviVolunteer and AngularProfiles extensions, and SparkPost is disabled.
Comments.UserDisplayName: msw
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-17T02:39:20.647Z
Comments.Text: Would {event.summary} happen to be an HTML table?  Could it be the same type of issue as https://lab.civicrm.org/dev/core/issues/58?
Comments.UserDisplayName: G H
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-23T08:01:22.703Z
Comments.Text: Can confirm I'm *still* getting this (huge) problem in CiviCRM 5.4 - and It does seem that smarty is the problem. Not sure on the solution, though I think maybe if the older failed emails can be cleared out, it should run properly again with ones not using **event.description**
Comments.UserDisplayName: Hugh
Tags: <scheduled-reminders><scheduled-job>
Title: Send Scheduled Reminders fails
ThreadText: # Send Scheduled Reminders fails
  
  (Asked by: username_0 on 2017-03-17)
  
  ## Installation Details
  
  * WordPress 4.7.3
  * CiviCRM 4.7.17
  * CiviVolunteer 4.6-2.2.1
  * Angular Profiles 4.6-1.0.2
  * SparkPost 1.1 (verified working)
  
  ## Problem Description
  
  I have a CiviEvent set up with a schedule reminder. The variables in the email template are:
  
  * {event.title}
  * {contact.display\_name}
  * {event.title}
  * {event.start\_date}
  * {event.summary}
  * {event.description}
  * {event.info\_url}
  
  When the cron job runs, the email is not sent and I get this error in the scheduled jobs log and no emails are sent:
  
  > Parameters parsed (and passed to API method):
  > a:1:{s:7:"version";i:3;}
  >
  > Full message:
  > Finished execution of Send Scheduled Reminders with result: Failure, >Error message: Cannot build query. Variable "@selectedValues" is unknown.
  
  Any idea what is wrong and how to debug and fix it?
  
  **Tags:** scheduled-reminders, scheduled-job
  
  > **Comments:**
  > **username_0**: Updated to WP 4.7.4 and CiviCRM 4.7.18... no change. Same error.  
  > **username_0**: CiviCRM 4.7.19 and the problem persists.  
  > **username_0**: CiviCRM 4.7.22... stiiiiill broken  Oh, and I have removed CiviVolunteer and AngularProfiles extensions, and SparkPost is disabled.  
  > **username_1**: Would {event.summary} happen to be an HTML table?  Could it be the same type of issue as https://lab.civicrm.org/dev/core/issues/58?  
  > **username_2**: Can confirm I'm *still* getting this (huge) problem in CiviCRM 5.4 - and It does seem that smarty is the problem. Not sure on the solution, though I think maybe if the older failed emails can be cleared out, it should run properly again with ones not using **event.description**  
  
  ---
  
  ## 0 answers
  
  