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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Debugging
Pages: [1]

Author Topic: Debugging  (Read 1217 times)

goran

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
Debugging
December 07, 2009, 08:32:57 am
I have a peculiar error on two of the forms.
1) Group not showing all the members
location: civicrm/group/search?reset=1&force=1&context=smog&gid=176
it tells me that there are 22 Group Members, but it lists only 5 (one of which have a different status then what I can see when looking at civicrm_group_contact)

So my question is how to debug this?
Where could I tell civicrm to print the sql that is used to produce the actual results used to fill {$rows} so I can check the data?
I've tried adding &backtrace=1 to url, but I got no backtrace (debugging is enabled in civicrm/admin/setting/debug?reset=1, and &smartyDebug=1 works. also I believe backtrack works when there is an actual error on the page)

2) Similar to 1) but on civicrm/mailing/browse/scheduled?scheduled=true&reset=1
Some of the mailings are not listed.

At this moment I think that the above issues are related to the state of my data and that they are not civicrm bugs. I would just like some help in investigating and setting up debugging.

Many thanks...

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Debugging
December 07, 2009, 12:31:53 pm
It's a bit "heavy" but you can force CiviCRM to output all queries to browser screen by adding this setting to civicrm.settings.php:

define( 'CIVICRM_DAO_DEBUG' , 1 );

...or enably MySQL logging (if not already enabled) and tail your log to see that's happening.
Protect your investment in CiviCRM by  becoming a Member!

goran

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
Re: Debugging
December 09, 2009, 08:45:35 am
Thanks, this was useful...
Is there an easy way to apply this setting only for admin or single user? Just so that it doesn't affect all users.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Debugging
December 09, 2009, 12:22:33 pm
You can potentially add a conditional in CRM/Core/DAO.php - check the init() function.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Debugging

This forum was archived on 2017-11-26.