CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • [SOLVED] non-recoverable error, and nothing in log file: CiviCRM.log
Pages: [1]

Author Topic: [SOLVED] non-recoverable error, and nothing in log file: CiviCRM.log  (Read 1105 times)

Sean Madsen

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 5
  • CiviCRM implementer/developer
    • Bikes Not Bombs
  • CiviCRM version: 4.6
  • CMS version: Drupal 7
[SOLVED] non-recoverable error, and nothing in log file: CiviCRM.log
February 27, 2010, 05:01:50 pm
Sometimes I run in to error messages in the front-end Civi user interface, and they always seem to appear in my log file as well (located at drupal/sites/default/files/civicrm/upload/CiviCRM.log ). Now I have run in to an error message, and there is nothing in the log file. The issue that generated the error message is probably a separate issue. I do need to figure that out obviously, but I feel like first I should figure out why Civi didn't write to the log, because if I can get Civi to log a backtrace (as Civi usually does), then it will be easier to fix the immediate issue I'm having.

The immediate issue is:
I tried registering a dummy user for a new event I created. (I've tried this in test mode and live mode). After clicking continue to proceed to PayPal (using PayPal standard), I received the following non-recoverable error:

Array
(
    [callback] => Array
        (
            
  • => CRM_Core_Error
  • [1] => handle
            )

        
[c0de] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] =>
  SELECT  participant.id, participant.contact_id
    FROM  civicrm_participant participant
   WHERE  participant.registered_by_id=5781 AND participant.status_id !=  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3]
    [type] => DB_Error
    [user_info] =>
  SELECT  participant.id, participant.contact_id
    FROM  civicrm_participant participant
   WHERE  participant.registered_by_id=5781 AND participant.status_id !=  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="
  SELECT  participant.id, participant.contact_id
    FROM  civicrm_participant participant
   WHERE  participant.registered_by_id=5781 AND participant.status_id !=  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3]"]
)

After this mess, I've checked the data, and: the new dummy user was created but no event participation was recorded for the new user.

I'm running CiviCRM 3.1.1 with Drupal 6.9.

If anyone can help me figure out how to get Civi to write to the log file, that would be really great. I've verified my resource URLs and directories, and the log file is writable by all users.
« Last Edit: February 28, 2010, 09:39:21 am by Sean Madsen »

Sean Madsen

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 5
  • CiviCRM implementer/developer
    • Bikes Not Bombs
  • CiviCRM version: 4.6
  • CMS version: Drupal 7
Re: non-recoverable error, and nothing in log file: CiviCRM.log
February 27, 2010, 10:49:08 pm
So I was having two issues, (1) I could not complete the event registration, and (2) CiviCRM did not seem to be writing error message to the log file anymore.

I have solved issue (1)...
Somehow, I ended up with bad data in the civicrm_participant_status_type table... there were some rows for which the `name` column had been set to a customized string instead of the standard values. To fix I looked at `select name from civicrm_participant_status_type` run on an empty CiviCRM database, then made sure that all those values were present in my civicrm_participant_status_type.name rows.

Issue (2) is still a bit strange.. maybe fluke. If anyone has suggestions to things I should check, please let me know because I feel like having a working log file is super important!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: non-recoverable error, and nothing in log file: CiviCRM.log
February 28, 2010, 07:22:07 am

the log files have been moved, they are now at:

drupal/sites/default/files/civicrm/templates_c/LOCALIZATION_DIR/ConfigAndLog/

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Sean Madsen

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 5
  • CiviCRM implementer/developer
    • Bikes Not Bombs
  • CiviCRM version: 4.6
  • CMS version: Drupal 7
Re: non-recoverable error, and nothing in log file: CiviCRM.log
February 28, 2010, 09:38:55 am
Ah wonderful! Exactly the type of answer I was looking for! Thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • [SOLVED] non-recoverable error, and nothing in log file: CiviCRM.log

This forum was archived on 2017-11-26.