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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Sorry. A non-recoverable error has occurred.
Pages: [1]

Author Topic: Sorry. A non-recoverable error has occurred.  (Read 1278 times)

willcivi

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.0.51a
  • PHP version: 5
Sorry. A non-recoverable error has occurred.
June 26, 2012, 04:55:55 pm
I'm working with civiCRM 4.1 and Drupal 7 and I'm getting a strange error.

Whenever I try to access the pledges page I get this error:

Quote
Sorry. A non-recoverable error has occurred.
DB Error: syntax error

I'm pretty new to civi.

Does anybody know what I did wrong?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sorry. A non-recoverable error has occurred.
June 27, 2012, 03:42:08 am
Can you enable debugging and post the full error message?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

willcivi

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.0.51a
  • PHP version: 5
Re: Sorry. A non-recoverable error has occurred.
July 02, 2012, 07:47:31 am
Oh, sorry about that

willcivi

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.0.51a
  • PHP version: 5
Re: Sorry. A non-recoverable error has occurred.
July 02, 2012, 07:48:59 am
Here it is:

Code: [Select]
Database Error Code: 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 'AND is_test=0' at line 3, 1064
Additional Details:

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

    [code] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] =>
SELECT sum( amount ) as pledge_amount, count( id ) as pledge_count
FROM   civicrm_pledge
WHERE  status_id =  AND is_test=0
 [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 'AND is_test=0' at line 3]
    [type] => DB_Error
    [user_info] =>
SELECT sum( amount ) as pledge_amount, count( id ) as pledge_count
FROM   civicrm_pledge
WHERE  status_id =  AND is_test=0
 [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 'AND is_test=0' at line 3]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="
SELECT sum( amount ) as pledge_amount, count( id ) as pledge_count
FROM   civicrm_pledge
WHERE  status_id =  AND is_test=0
 [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 'AND is_test=0' at line 3]"]
)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sorry. A non-recoverable error has occurred.
July 02, 2012, 08:45:24 am
Did you delete any pledge statuses from the list of statuses?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

willcivi

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.0.51a
  • PHP version: 5
Re: Sorry. A non-recoverable error has occurred.
July 02, 2012, 12:35:30 pm
I don't believe there is any pledges in the system. I'm just going through the system and this error pops up when I try to access the pledge dashboard.


Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sorry. A non-recoverable error has occurred.
July 02, 2012, 03:45:17 pm
Was this site upgraded or is a fresh install?

Sounds like you may need to adjust the database slightly to fix this. Do you have access to the database such as via phpMyAdmin?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

willcivi

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.0.51a
  • PHP version: 5
Re: Sorry. A non-recoverable error has occurred.
July 03, 2012, 04:07:47 pm
Yes it was upgraded.

I do have access to the database both through SSH and phpmyadmin.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sorry. A non-recoverable error has occurred.
July 04, 2012, 03:45:56 am
I'm not actually sure where pledge statuses are stored. Can you run this query:

Code: [Select]
SELECT *  FROM `civicrm_option_group` WHERE `name` = 'contribution_status';
and then see the id field? By me it's 11. So then run this:

Code: [Select]
SELECT *
FROM `civicrm_option_value`
WHERE option_group_id =11

and post here what you get?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

willcivi

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.0.51a
  • PHP version: 5
Re: Sorry. A non-recoverable error has occurred.
July 05, 2012, 07:14:03 am
Sure thing. Here's what I got:

idoption_group_idlabelvaluenamegroupingfilteris_defaultweightdescriptionis_optgroupis_reservedis_activecomponent_iddomain_idvisibility_id
5011Completed1CompletedNULL0NULL1NULL011NULLNULLNULL
5111Pending2PendingNULL0NULL2NULL011NULLNULLNULL
5211Cancelled3CancelledNULL0NULL3NULL011NULLNULLNULL
5311Failed4FailedNULL0NULL4NULL011NULLNULLNULL
5411In Progress5In ProgressNULL0NULL5NULL011NULLNULLNULL
30911Overdue6NULLNULLNULLNULL6NULL001NULLNULLNULL

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sorry. A non-recoverable error has occurred.
July 05, 2012, 08:31:52 am
That looks correct to me. I'm afraid I don't know what's wrong with your site. :(
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

willcivi

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.0.51a
  • PHP version: 5
Re: Sorry. A non-recoverable error has occurred.
July 06, 2012, 11:55:16 am
Yeah. it's a toughie.

But I do appreciate the help anyways.  At least I've pinpointed it down to a a weird sql syntax error.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sorry. A non-recoverable error has occurred.
July 07, 2012, 12:28:02 pm
Perhaps you realize this, but the bad SQL is this:

Quote
WHERE  status_id =  AND is_test=0

and what's wrong is that it's missing the value for the status_id, meaning it should look something like:

Quote
WHERE  status_id = 1  AND is_test=0

but I don't know why the status ID value is missing.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Sorry. A non-recoverable error has occurred.

This forum was archived on 2017-11-26.