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 »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Problem with custom searches
Pages: [1]

Author Topic: Problem with custom searches  (Read 591 times)

dcalp

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
Problem with custom searches
December 14, 2010, 08:44:31 am
Hello:
I don't know if this is the correct place to post this, but because it is about a core function, I hope I'm right.

I recently updated to 3.3 from 3.1.5 and after that I have a problem with custom searches.

The problem is that the exporting code is replacing / with . in a path, and the file intended to open is not found.

the problem is in line 917 of sites/all/modules/civicrm/CRM/Export/BAO/Export.php

The change I made to solve this is:

// require_once( str_replace( '_', DIRECTORY_SEPARATOR, $ext->classToPath($customSearchClass )));
   require_once( str_replace( '_', DIRECTORY_SEPARATOR, $customSearchClass ).".php");


The function that make this is
  /**
     * Given the class, provides extension path.
     *
     * @access public
     * @param string $key extension key
     * @return string name of extension key
     */
    public function classToPath( $clazz ) {
        $elements = explode( '_', $clazz );
   $key = implode( '.', $elements );
   return $this->keyToPath( $key );
    }

from CRM/Core/Extensions.php

Why classToPath uses . to create a directory path?

Thanks a lot!
Diego





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: Problem with custom searches
December 14, 2010, 09:33:08 am

This has been reported and is fixed in 3.3.1

http://issues.civicrm.org/jira/browse/CRM-7182

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Problem with custom searches

This forum was archived on 2017-11-26.