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 CiviReport (Moderator: Dave Greenberg) »
  • Cannot run the Relationship Report - errors out with DB Error: no such field
Pages: [1]

Author Topic: Cannot run the Relationship Report - errors out with DB Error: no such field  (Read 1049 times)

matthewboh

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 2
Cannot run the Relationship Report - errors out with DB Error: no such field
November 06, 2011, 10:09:00 am
I'm running 4.0.4 on a hosted server and I can't get the Relationship Report to run.  In order to fix it, I  upgraded to 4.0.7 but still  having the same problem.  I then downloaded the data and loaded it onto a local machine to see if I could figure out the problem - but it works fine on the local machine.

I read about it being caused by possible schema issues with a bad upgrade, so I created a new database and loaded the data into it - same problem.

So I then ran the query locally, found the SQL SELECT statement that is generated for the report, and ran it on the data on the hosted server and no errors on the query, but still the same error when trying to run the report on the hosted server.

Ideas?  Here's the backtrace

Quote
backTrace

/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 159
, handle,
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 931
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB.php, PEAR_Error, 968
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/PEAR.php, DB_Error, 564
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/common.php, raiseError, 1903
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/mysql.php, raiseError, 898
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/common.php, simpleQuery, 1216
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/DataObject.php, query, 2424
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/DataObject.php, _query, 1610
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 152
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 879
/home2/frederk3/public_html/lcfcadmin/sites/all/civicrm_custom/CRM/Report/Form.php, executeQuery, 1594
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Report/Form/Contact/Relationship.php, buildRows, 461
/home2/frederk3/public_html/lcfcadmin/sites/all/civicrm_custom/CRM/Report/Form.php, postProcess, 430
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Report/Form/Contact/Relationship.php, preProcess, 219
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/Form.php, preProcess, 325
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php, buildForm, 99
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 284
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Utils/Wrapper.php, run, 115
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Report/Page/Instance.php, run, 108
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 224
/home2/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 447
, civicrm_invoke,
/home2/frederk3/public_html/lcfcadmin/includes/menu.inc, call_user_func_array, 503
/home2/frederk3/public_html/lcfcadmin/index.php, menu_execute_active_handler, 21

Sorry. A non-recoverable error has occurred.
DB Error: no such field
Error Details

Return to home page.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cannot run the Relationship Report - errors out with DB Error: no such field
November 06, 2011, 11:21:11 am
What are the PHP and MySQL versions on your host?
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.

matthewboh

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 2
Re: Cannot run the Relationship Report - errors out with DB Error: no such field
November 06, 2011, 11:37:45 am
PHP 5.2.17 / MySQL 5.1.58-community-log

Let me see if I can get the PHP upgraded

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: Cannot run the Relationship Report - errors out with DB Error: no such field
November 06, 2011, 04:14:57 pm

can u run the same query on your production server and see if it works there

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

matthewboh

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 2
Re: Cannot run the Relationship Report - errors out with DB Error: no such field
November 08, 2011, 02:55:08 am
Ran the query on the production server - no error.  Upgraded to PHP Version 5.3.8 - exact same error

Quote
backTrace

/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 159
, handle,
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 931
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB.php, PEAR_Error, 968
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/PEAR.php, DB_Error, 564
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/common.php, raiseError, 1903
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/mysql.php, raiseError, 898
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/common.php, simpleQuery, 1216
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/DataObject.php, query, 2424
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/DB/DataObject.php, _query, 1610
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 152
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 879
/home6/frederk3/public_html/lcfcadmin/sites/all/civicrm_custom/CRM/Report/Form.php, executeQuery, 1594
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Report/Form/Contact/Relationship.php, buildRows, 461
/home6/frederk3/public_html/lcfcadmin/sites/all/civicrm_custom/CRM/Report/Form.php, postProcess, 430
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Report/Form/Contact/Relationship.php, preProcess, 219
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/Form.php, preProcess, 325
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php, buildForm, 99
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 284
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Utils/Wrapper.php, run, 115
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Report/Page/Instance.php, run, 108
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 224
/home6/frederk3/public_html/lcfcadmin/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 447
, civicrm_invoke,
/home6/frederk3/public_html/lcfcadmin/includes/menu.inc, call_user_func_array, 503
/home6/frederk3/public_html/lcfcadmin/index.php, menu_execute_active_handler, 21


« Last Edit: November 08, 2011, 03:19:05 am by matthewboh »

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: Cannot run the Relationship Report - errors out with DB Error: no such field
November 08, 2011, 06:39:40 am

I suspect u r trapping the wrong query and/or error message

i dont think i've seen the case where: civi/php throws a mysql error while the same query from the command line does not

the error message should have the query and the specific error message, so might want to take another look

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

matthewboh

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 2
Re: Cannot run the Relationship Report - errors out with DB Error: no such field
November 09, 2011, 07:24:11 am
D'oh!  I had copied in Form.php into the custom folder from an older version of CiviCRM and the Relationship Report was picking it up.  I deleted the Form.php in the custom folder and everything now works fine.

Thanks for all the help!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Cannot run the Relationship Report - errors out with DB Error: no such field

This forum was archived on 2017-11-26.