Answers.Body: <p>This seems to be a bug as it's also reported by another user.  So I raised this issue <a href="https://issues.civicrm.org/jira/browse/CRM-21799" rel="nofollow noreferrer">https://issues.civicrm.org/jira/browse/CRM-21799</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-25T17:28:43.057Z
Answers.LastActivityDate: 2018-02-25T17:28:43.057Z
Answers.UserDisplayName: Andy Clark
Answers.Body: <p>Here is the query and error message:</p>
  
  <pre><code>INSERT IGNORE INTO civicrm_temp_civireport_logsummary SELECT entity_log_civireport.id as log_civicrm_entity_id, 1, entity_log_civireport.log_action as log_civicrm_entity_log_action, '' as log_civicrm_entity_log_type, entity_log_civireport.log_user_id as log_civicrm_entity_log_user_id, entity_log_civireport.log_date as log_civicrm_entity_log_date, modified_contact_civireport.display_name as log_civicrm_entity_altered_contact, modified_contact_civireport.id as log_civicrm_entity_altered_contact_id, entity_log_civireport.log_conn_id as log_civicrm_entity_log_conn_id, modified_contact_civireport.is_deleted as log_civicrm_entity_is_deleted, altered_by_contact_civireport.display_name as altered_by_contact_display_name  
  FROM `dcmadmin_civicrm`. entity_log_civireport
  
  INNER JOIN civicrm_contact modified_contact_civireport
          ON (entity_log_civireport.entity_id = modified_contact_civireport.id )
  LEFT  JOIN civicrm_contact altered_by_contact_civireport
          ON (entity_log_civireport.log_user_id = altered_by_contact_civireport.id) WHERE ( modified_contact_civireport.id = 9304 ) AND (entity_log_civireport.log_action != 'Initialization') GROUP BY entity_log_civireport.log_conn_id, entity_log_civireport.log_user_id, EXTRACT(DAY_MICROSECOND FROM entity_log_civireport.log_date), entity_log_civireport.id;
  
  [nativecode=1146 ** Table 'dcmadmin_civicrm.entity_log_civireport' doesn't exist]
  </code></pre>
  
  <p>This is generated from one of the Ajax calls which is fired when you click on the Change Log tab of a Contact. The URL of that call is:</p>
  
  <pre><code>/civicrm/report/instance/108?reset=1&amp;force=1&amp;snippet=json&amp;section=2&amp;altered_contact_id_op=eq&amp;altered_contact_id_value=9304&amp;cid=9304
  </code></pre>
  
  <p>I am not sure what the precise problem is, but those are the details. Given that this site uses CiviCRM 4.7.27 I would recommend that the first step would be to upgrade, if possible.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-21T13:32:28.200Z
Answers.Text: Upgrade to 4.7.30 you mean
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-21T13:33:22.193Z
Answers.Text: Meant to add a question mark to the above comment..
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-21T13:28:43.073Z
Answers.LastActivityDate: 2018-02-21T13:28:43.073Z
Answers.UserDisplayName: Hershel
Body: <p><a href="https://i.sstatic.net/urUFZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/urUFZ.png" alt="enter image description here"></a>I just switched logging on for a 4.7.27 install which was working just fine.  Now, when clicking on 'Change Log' tab I get the 'Network Error' popup with the message about being unable to reach the server.  And there's no response at all. The rest of the system works OK still. I checked all the log_xxx tables were created, cleared Civi &amp; Drupal caches. I've also looked at the several questions about this error but none seem to apply - this was a site that was working OK and it's only the change log that's affected. This is a Civihosting hosted account, by the way.  Ideas?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-18T10:02:04.003Z
Comments.Text: I switched logging off, old change log records OK, so deleted all log_ tables then tried again.  Still same problem.
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-18T21:34:52.820Z
Comments.Text: You may want to examine XHR  output in your browser's development console and / or civicrm "ConfigAndLog" folder content (assuming you've already made the latter though..)
Comments.UserDisplayName: yurg
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-19T10:39:14.533Z
Comments.Text: Any error you see in the civi  log file as mentioned by yurg above ?
Comments.UserDisplayName: jitendra - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-19T10:46:37.137Z
Comments.Text: Frankly I don't have a clue about XHR errors, which is why I posted it in the hope that someone might see something.  There's nothing in ConfigAndLog folder in Civi so the problem doesn't seem to be caused by a crash.
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-19T12:04:38.093Z
Comments.Text: @AndyClark It's weird there is nothing in civi logs. What about "general" server logs (apache/nginx and/or php)?  What if you click through each XHR  response and see output details? Something  like this: https://imgur.com/a/rUVmT It may contain a clue, doesn't have to though.
Comments.UserDisplayName: yurg
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-19T12:23:47.497Z
Comments.Text: There are some crash reports in ConfigAndLog - here's a key line from the backtrace which indicates that a table doesn't exist - I clicked on 'Change Log' and got this error.. I guess this is the cause of the problem.  But this seems to be a temporary table that gets removed so I'm still puzzled as to why this crashes.
  #9 /home/dcmadmin/www/www/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-18, NULL, NULL, NULL, "1146 ** Table 'dcmadmin_civicrm.entity_log_civireport' doesn't exist")
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-19T13:56:39.410Z
Comments.Text: And equally puzzled as to why the problem of the missing table should occur & how to fix it!  I guess I could create this table but I have no idea of the table structure, but as it's clearly a temporary table why isn't Civi able to create it?
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-19T16:56:24.017Z
Comments.Text: Have you put in a support ticket with CiviHosting?
Comments.UserDisplayName: themak
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-19T17:46:20.310Z
Comments.Text: @AndyClark That\s exactly my story from day before yesterday: Civi all of sudden  started to complain regarding missing log_ tables, though no structure or configuration changes have been made. Drupal "cache clear" helped, yet I've no idea where the issue came from and where and for how long did it go..
Comments.UserDisplayName: yurg
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-19T18:19:49.407Z
Comments.Text: Interesting yurg - I'm on 4.7.27 - what release are you on?
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-19T22:07:07.753Z
Comments.Text: @AndyClark It says "Powered by CiviCRM 4.6.33"! Have left it for a week or so working as it should and found this "missing log table" popped up from nothing. Well, this is CiviCRM, The Lord Almighty please forgive us for our faults...
Comments.UserDisplayName: yurg
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-20T13:02:04.393Z
Comments.Text: This problem is not that I'm getting 'Unable to reach server' - it's that for some reason Civi isn't building temporary tables successfully.  So I guess it would be reasonable to open a new question, which would then be clearer.
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-20T13:10:18.013Z
Comments.Text: Raised this as a new question - https://civicrm.stackexchange.com/questions/22811/change-log-crashes-table-entity-log-civireport-doesnt-exist-how-to-fix
Comments.UserDisplayName: Andy Clark
Tags: <drupal><4.7><logging>
Title: Switched "logging" on - now get 'Unable to reach server'?
ThreadText: # Switched "logging" on - now get 'Unable to reach server'?
  
  (Asked by: username_0 on 2018-02-16)
  
  [![enter image description here](https://i.sstatic.net/urUFZ.png)](https://i.sstatic.net/urUFZ.png)I just switched logging on for a 4.7.27 install which was working just fine. Now, when clicking on 'Change Log' tab I get the 'Network Error' popup with the message about being unable to reach the server. And there's no response at all. The rest of the system works OK still. I checked all the log\_xxx tables were created, cleared Civi & Drupal caches. I've also looked at the several questions about this error but none seem to apply - this was a site that was working OK and it's only the change log that's affected. This is a Civihosting hosted account, by the way. Ideas?
  
  **Tags:** drupal, 4.7, logging
  
  > **Comments:**
  > **username_0**: I switched logging off, old change log records OK, so deleted all log_ tables then tried again.  Still same problem.  
  > **username_1**: You may want to examine XHR  output in your browser's development console and / or civicrm "ConfigAndLog" folder content (assuming you've already made the latter though..)  
  > **username_2**: Any error you see in the civi  log file as mentioned by username_1 above ?  
  > **username_0**: Frankly I don't have a clue about XHR errors, which is why I posted it in the hope that someone might see something.  There's nothing in ConfigAndLog folder in Civi so the problem doesn't seem to be caused by a crash.  
  > **username_1**: @AndyClark It's weird there is nothing in civi logs. What about "general" server logs (apache/nginx and/or php)?  What if you click through each XHR  response and see output details? Something  like this: https://imgur.com/a/rUVmT It may contain a clue, doesn't have to though.  
  > **username_0**: There are some crash reports in ConfigAndLog - here's a key line from the backtrace which indicates that a table doesn't exist - I clicked on 'Change Log' and got this error.. I guess this is the cause of the problem.  But this seems to be a temporary table that gets removed so I'm still puzzled as to why this crashes. #9 /home/dcmadmin/www/www/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-18, NULL, NULL, NULL, "1146 ** Table 'dcmadmin_civicrm.entity_log_civireport' doesn't exist")  
  > **username_0**: And equally puzzled as to why the problem of the missing table should occur & how to fix it!  I guess I could create this table but I have no idea of the table structure, but as it's clearly a temporary table why isn't Civi able to create it?  
  > **username_3**: Have you put in a support ticket with CiviHosting?  
  > **username_1**: @AndyClark That\s exactly my story from day before yesterday: Civi all of sudden  started to complain regarding missing log_ tables, though no structure or configuration changes have been made. Drupal "cache clear" helped, yet I've no idea where the issue came from and where and for how long did it go..  
  > **username_0**: Interesting username_1 - I'm on 4.7.27 - what release are you on?  
  > **username_1**: @AndyClark It says "Powered by CiviCRM 4.6.33"! Have left it for a week or so working as it should and found this "missing log table" popped up from nothing. Well, this is CiviCRM, The Lord Almighty please forgive us for our faults...  
  > **username_0**: This problem is not that I'm getting 'Unable to reach server' - it's that for some reason Civi isn't building temporary tables successfully.  So I guess it would be reasonable to open a new question, which would then be clearer.  
  > **username_0**: Raised this as a new question - https://civicrm.stackexchange.com/questions/22811/change-log-crashes-table-entity-log-civireport-doesnt-exist-how-to-fix  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-02-25. Score: 1
  
  This seems to be a bug as it's also reported by another user. So I raised this issue <https://issues.civicrm.org/jira/browse/CRM-21799>
  
  
  ---
  
  ### Answer by username_4 on 2018-02-21. Score: 0
  
  Here is the query and error message:
  INSERT IGNORE INTO civicrm_temp_civireport_logsummary SELECT entity_log_civireport.id as log_civicrm_entity_id, 1, entity_log_civireport.log_action as log_civicrm_entity_log_action, '' as log_civicrm_entity_log_type, entity_log_civireport.log_user_id as log_civicrm_entity_log_user_id, entity_log_civireport.log_date as log_civicrm_entity_log_date, modified_contact_civireport.display_name as log_civicrm_entity_altered_contact, modified_contact_civireport.id as log_civicrm_entity_altered_contact_id, entity_log_civireport.log_conn_id as log_civicrm_entity_log_conn_id, modified_contact_civireport.is_deleted as log_civicrm_entity_is_deleted, altered_by_contact_civireport.display_name as altered_by_contact_display_name  
  FROM `dcmadmin_civicrm`. entity_log_civireport
  
  INNER JOIN civicrm_contact modified_contact_civireport
          ON (entity_log_civireport.entity_id = modified_contact_civireport.id )
  LEFT  JOIN civicrm_contact altered_by_contact_civireport
          ON (entity_log_civireport.log_user_id = altered_by_contact_civireport.id) WHERE ( modified_contact_civireport.id = 9304 ) AND (entity_log_civireport.log_action != 'Initialization') GROUP BY entity_log_civireport.log_conn_id, entity_log_civireport.log_user_id, EXTRACT(DAY_MICROSECOND FROM entity_log_civireport.log_date), entity_log_civireport.id;
  
  [nativecode=1146 ** Table 'dcmadmin_civicrm.entity_log_civireport' doesn't exist]
  
  This is generated from one of the Ajax calls which is fired when you click on the Change Log tab of a Contact. The URL of that call is:
  /civicrm/report/instance/108?reset=1&force=1&snippet=json&section=2&altered_contact_id_op=eq&altered_contact_id_value=9304&cid=9304
  
  I am not sure what the precise problem is, but those are the details. Given that this site uses CiviCRM 4.7.27 I would recommend that the first step would be to upgrade, if possible.
  
  > **Comments:**
  > **username_0**: Upgrade to 4.7.30 you mean  
  > **username_0**: Meant to add a question mark to the above comment..  
  
  ---
  
  