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) »
  • New installation was working fine, now getting fatal error
Pages: [1]

Author Topic: New installation was working fine, now getting fatal error  (Read 2039 times)

memikkelsen

  • Guest
New installation was working fine, now getting fatal error
January 31, 2009, 09:22:54 pm
Hi,

I'm very new to CiviCRM and relatively new to Drupal. I installed CiviCRM 2.0 a couple days ago, on an existing Drupal 5 installation. Everything was working fine, but now when I log in to our Drupal site and click on CiviCRM on the menu, I get this error:

Fatal error: Cannot redeclare class CRM_Utils_Sort in /data/home/safer9/websites/database.safercampus.org/docs/drupal-5.5/sites/all/modules/civicrm/CRM/Utils/Sort.php on line 51

I can't think of what I could have done to cause this, and I don't know how to fix it.

Here is line 51 on of Sort.php:

#
class CRM_Utils_Sort {
#
 
#
/**
#
  * constants to determine what direction each variable
#
  * is to be sorted
#
  *
#
  * @var int
#
  */
#
const
#
ASCENDING = 1,
#
DESCENDING = 2,
#
DONTCARE = 4,
#
 
#
/**
#
  * the name for the sort GET/POST param
#
  *
#
  * @var string
#
  */
#
SORT_ID = 'crmSID',
#
SORT_DIRECTION = 'crmSortDirection',
#
SORT_ORDER = 'crmSortOrder';
#
 
#
/**
#
  * name of the sort function. Used to isolate session variables
#
  * @var string
#
  */
#
protected $_name;
#
 
#
/**
#
  * array of variables that influence the query
#
  *
#
  * @var array
#
  */
#
public $_vars;
#
 
#
/**
#
  * the newly formulated base url to be used as links
#
  * for various table elements
#
  *
#
  * @var string
#
  */
#
protected $_link;
#
 
#
/**
#
  * what's the name of the sort variable in a REQUEST
#
  *
#
  * @var string
#
  */
#
protected $_urlVar;
#
 
#
/**
#
  * What variable are we currently sorting on
#
  *
#
  * @var string
#
  */
#
protected $_currentSortID;
#
 
#
/**
#
  * What direction are we sorting on
#
  *
#
  * @var string
#
  */
#
protected $_currentSortDirection;
#
 
#
 
#
/**
#
  * The output generated for the current form
#
  *
#
  * @var array
#
  */
#
public $_response;
#
 
#
/**
#
  * The constructor takes an assoc array
#
  * key names of variable (which should be the same as the column name)
#
  * value: ascending or descending
#
  *
#
  * @param mixed $vars - assoc array as described above
#
  * @param string $defaultSortOrder - order to sort
#
  *
#
  * @return void
#
  * @access public
#
  */
#
function __construct( &$vars, $defaultSortOrder = null ) {
#
$this->_vars = array( );
#
$this->_response = array();
#
 
#
foreach ( $vars as $weight => $value ) {
#
$this->_vars[$weight] = array(
#
'name' => $value['sort'],
#
'direction' => $value['direction'],
#
'title' => $value['name'],
#
);
#
}
#
 
#
$this->_currentSortID = 1;
#
if ( isset( $this->_vars[$this->_currentSortID] ) ) {
#
$this->_currentSortDirection = $this->_vars[$this->_currentSortID]['direction'];
#
}
#
$this->_urlVar = self::SORT_ID;
#
$this->_link = CRM_Utils_System::makeUrl( $this->_urlVar );
#
 
#
$this->initialize( $defaultSortOrder );
#
}
#
 
#
/**
#
  * Function returns the string for the order by clause
#
  *
#
  * @return string the order by clause
#
  * @access public
#
  */

Any guidance would be much appreciated. Many 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: New installation was working fine, now getting fatal error
February 01, 2009, 06:31:04 am

if you are new to civicrm and drupal, we highly recommend using drupal 6 and civicrm 2.1

CiviCRM 2.0 is no longer actively supported. Deploying it now is not a good idea (IMO)

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

memikkelsen

  • Guest
Re: New installation was working fine, now getting fatal error
February 03, 2009, 11:29:15 pm
Thanks. I'd like to use Drupal 6, but one of the modules we need is only available for Drupal 5. Until that changes, we have to stick with Drupal 5.

Anyone have any suggestions?

Thanks.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: New installation was working fine, now getting fatal error
February 04, 2009, 12:33:52 am
Quote from: memikkelsen on January 31, 2009, 09:22:54 pm
Fatal error: Cannot redeclare class CRM_Utils_Sort in /data/home/safer9/websites/database.safercampus.org/docs/drupal-5.5/sites/all/modules/civicrm/CRM/Utils/Sort.php on line 51

I can't think of what I could have done to cause this, and I don't know how to fix it.

Are you sure you don’t have a second copy of the CiviCRM codebase somewhere in your Drupal directory?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

memikkelsen

  • Guest
Re: New installation was working fine, now getting fatal error
February 04, 2009, 10:47:46 am
I looked around, and I don't see one.
Thanks.

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: New installation was working fine, now getting fatal error
February 04, 2009, 10:55:46 am
A couple of questions which might help -

 * Do you recall what other steps you took to configure CiviCRM after installing it? ie, did you attempt to set up CiviMail or any other extra components post-install?

 * Can you please list which other Drupal modules you currently have installed?
@xurizaemon ● www.fuzion.co.nz

memikkelsen

  • Guest
Re: New installation was working fine, now getting fatal error
February 10, 2009, 10:40:21 am
Thanks.

Other Drupal modules we have installed include:

Taxonomy Access Control
Webform
Auto Assign Role
Mass contact

I wish I could remember what I had done when it stopped working, but it was one of those things where I went to bed with it working, and work up and it wasn't.

Would folks suggest uninstalling CiviCRM, and reinstalling it using the existing civicrm database I set up for it? Or perhaps doing a fresh installation with a new database, and copying user tables from the exiting database to the new?

memikkelsen

  • Guest
Re: New installation was working fine, now getting fatal error
February 11, 2009, 09:24:57 pm
So I think this is my problem: http://forum.civicrm.org/index.php/topic,6411.0.html
because we have the same host, and it happened at the same time.

Thanks to everyone who tried to help.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • New installation was working fine, now getting fatal error

This forum was archived on 2017-11-26.