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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Custom search results lost after upgrade to 4.2
Pages: [1]

Author Topic: Custom search results lost after upgrade to 4.2  (Read 506 times)

artfulrobot.com

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 4
Custom search results lost after upgrade to 4.2
September 05, 2012, 01:47:38 pm
I've written a custom search. In 4.1 it worked: it showed the results, you could page through them, you could do search tasks on them like printing mailing labels.

Now my search still works, but only as far as displaying the results; try to do a task on them and it's as if the query was returning zero records.

I've had a look at other searches and I can't see that anything's changed significantly. I'm stumped!

My search returns the contact_id values for all the records (as specified in the Developer Docs http://en.flossmanuals.net/civicrm-developer-guide/custom-searches/). The only non-standard thing my custom search does is that the ORDER BY clause is hard-coded because of a special requirement; so the $sort parameter to all() is ignored, but that shouldn't make any difference? Oh also, I don't use the from() method, but again I've put in an error_log() call there and this method is not being called.

I've put in error_log() calls and noticed that the search is only run at search time, not when you select a task, which means that the task must be running off a copy of the search results, so perhaps it's populating this cache that's the problem?

The only other oddness I've noticed is that I get "Notice: Undefined property: CRM_Core_DAO::$contact_type_orig in CRM_Contact_Selector_Custom->getRows() (line 310 of /var/www/mysite/sites/all/modules/civicrm/CRM/Contact/Selector/Custom.php)." for each row presented.


Thanks.

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: Custom search results lost after upgrade to 4.2
September 05, 2012, 03:50:31 pm

can u ping us on irc and we can help debug. might make it easier if we have a copy of the custom search etc

suspect a bug in 4.2 with regard to this :(

thanx

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

artfulrobot.com

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 4
Re: Custom search results lost after upgrade to 4.2
September 07, 2012, 01:50:00 am
OK, will try to catch someone - who's best to look out for on IRC about this level of stuff? (I often find a bewildered silence on IRC when I post developer questions!) you, Kurund? any others that work on this?

Thanks, speak soon.

artfulrobot.com

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 4
Re: Custom search results lost after upgrade to 4.2
September 07, 2012, 02:24:10 am
Spoke witih Kurund on IRC, and he suggested I try out a custom search on the demo site. Turns out it wasn't my code that was broken (phew!).

Issue filed: http://issues.civicrm.org/jira/browse/CRM-10789

cheers.

artfulrobot.com

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 4
Re: Custom search results lost after upgrade to 4.2
September 09, 2012, 12:25:00 pm
For sake of completeness: Kurund wrote a patch that fixed this bug :-)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Custom search results lost after upgrade to 4.2

This forum was archived on 2017-11-26.