Answers.Body: <p>The "DB Error: no such field" bit in your error message is your key clue.</p>
  
  <p>The missing field is listed as "Unknown column 'j.start_date' in 'where clause'", but it's not showing any more of the sql to know which table that comes from.</p>
  
  <p>I dug through some code, and I'm pretty sure it's supposed to be coming from the civicrm_mailing_job.</p>
  
  <p>So - either that table isn't getting joined properly (likely a code issue), or else that field is missing in that table in your instance.</p>
  
  <p>Since 5.22.1 is fresh out the door, it could be a code issue.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-21T15:32:45.130Z
Answers.LastActivityDate: 2020-02-21T15:32:45.130Z
Answers.UserDisplayName: Alan Dixon
Body: <p>We are having an issue with tracking opens for mailing. Click throughs track fine but opens do not. I inserted the URL for the tracking image into my browser and got a 500 error. I get the following in the PHP error log:</p>
  
  <pre><code> [19-Feb-2020 16:37:18 UTC] PHP Fatal error:  Uncaught Exception: Function "is_admin()" is missing, even though WordPress is the user framework. in /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php:264
  Stack trace:
  #0 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(203): CRM_Utils_System_Base-&gt;theme('&lt;div id="crm-co...', false, false)
  #1 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(196): CRM_Utils_System::theme('&lt;div id="crm-co...')
  #2 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
  #3 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(998): PEAR_Error-&gt;__construct('DB Error: no su...', -19, 16, Array, 'INSERT INTO civ...')
  #4 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error-&gt;__construct(-19, 16, Array, 'INSERT INTO civ...')
  #5 /home/mysite/public_html/wp-content/plug in /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 264
  </code></pre>
  
  <p>We get the following in the CiviCRM log:</p>
  
  <pre><code>[error] $Fatal Error Details = Array
  (
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; handle
          )
  
      [code] =&gt; -19
      [message] =&gt; DB Error: no such field
      [mode] =&gt; 16
      [debug_info] =&gt; INSERT INTO civicrm_mailing_event_opened (event_queue_id , time_stamp ) VALUES ( 34 ,  20200219164337 )  [nativecode=1054 ** Unknown column 'j.start_date' in 'where clause']
      [type] =&gt; DB_Error
      [user_info] =&gt; INSERT INTO civicrm_mailing_event_opened (event_queue_id , time_stamp ) VALUES ( 34 ,  20200219164337 )  [nativecode=1054 ** Unknown column 'j.start_date' in 'where clause']
      [to_string] =&gt; [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_mailing_event_opened (event_queue_id , time_stamp ) VALUES ( 34 ,  20200219164337 )  [nativecode=1054 ** Unknown column 'j.start_date' in 'where clause']"]
  )
  </code></pre>
  
  <p>Site is WordPress 5.3.2, CiviCRM 5.22.1</p>
  
Tags: <reports><mailing>
Title: Errors Tracking Opens
ThreadText: # Errors Tracking Opens
  
  (Asked by: username_0 on 2020-02-19)
  
  We are having an issue with tracking opens for mailing. Click throughs track fine but opens do not. I inserted the URL for the tracking image into my browser and got a 500 error. I get the following in the PHP error log:
  
  ```
   [19-Feb-2020 16:37:18 UTC] PHP Fatal error:  Uncaught Exception: Function "is_admin()" is missing, even though WordPress is the user framework. in /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php:264
  Stack trace:
  #0 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(203): CRM_Utils_System_Base->theme('<div id="crm-co...', false, false)
  #1 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(196): CRM_Utils_System::theme('<div id="crm-co...')
  #2 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
  #3 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(998): PEAR_Error->__construct('DB Error: no su...', -19, 16, Array, 'INSERT INTO civ...')
  #4 /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-19, 16, Array, 'INSERT INTO civ...')
  #5 /home/mysite/public_html/wp-content/plug in /home/mysite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 264
  
  ```
  
  We get the following in the CiviCRM log:
  
  ```
  [error] $Fatal Error Details = Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )
  
      [code] => -19
      [message] => DB Error: no such field
      [mode] => 16
      [debug_info] => INSERT INTO civicrm_mailing_event_opened (event_queue_id , time_stamp ) VALUES ( 34 ,  20200219164337 )  [nativecode=1054 ** Unknown column 'j.start_date' in 'where clause']
      [type] => DB_Error
      [user_info] => INSERT INTO civicrm_mailing_event_opened (event_queue_id , time_stamp ) VALUES ( 34 ,  20200219164337 )  [nativecode=1054 ** Unknown column 'j.start_date' in 'where clause']
      [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_mailing_event_opened (event_queue_id , time_stamp ) VALUES ( 34 ,  20200219164337 )  [nativecode=1054 ** Unknown column 'j.start_date' in 'where clause']"]
  )
  
  ```
  
  Site is WordPress 5.3.2, CiviCRM 5.22.1
  
  **Tags:** reports, mailing
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-02-21. Score: 1
  
  The "DB Error: no such field" bit in your error message is your key clue.
  
  The missing field is listed as "Unknown column 'j.start\_date' in 'where clause'", but it's not showing any more of the sql to know which table that comes from.
  
  I dug through some code, and I'm pretty sure it's supposed to be coming from the civicrm\_mailing\_job.
  
  So - either that table isn't getting joined properly (likely a code issue), or else that field is missing in that table in your instance.
  
  Since 5.22.1 is fresh out the door, it could be a code issue.
  
  
  ---
  
  