0

We are working on a long-needed update of our website. I thought I would take the opportunity to also follow what many say is best practice and move our Civi db out of a db shared with our Joomla CMS. I have done this on our development site, and so far so good. Except, that when trying to create a new CiviEvent Listing Joomla module, I get this error: "Table '[organization]_dev.civicrm_event' doesn't exist"

It is true that doesn't exist, because it should be looking for [organization]_dev_civi.civicrm_event. The db [organization]_dev is the CMS only. I've reconfirmed that my database settings are correct in civicrm.settings.php in both Administrator and component. I've cleared the Joomla cache.

Any ideas what's going on? Where else can I look?

UPDATE:

In searching for possible fixes, I have made the following changes, to no avail:

Added this line in CMS config file (www/dev/configuration.php) under class JConfig:

public $cividb = 'username_dev_civi';

in www/dev/administrator/components/com_civicrm/configure.php

     'dbName' => $jConfig->db,

changed to

    'dbName' => $jConfig->cividb,

In CiviEvent Listing module file (www/dev/modules/mod_civievent/helper.php)

    $db = JFactory::getDBO();

Changed to

    $db = 'username_dev_civi';
  • 1
    I just came across this from the Civi Admin Guide. It isn't a solution to this particular problem (I've moved on at this point and put the Civi DB back into the CMS db.), but it at least provides evidence that there are files in Civi Core beyond civicrm.settings.php that need to be changed in order to fully integrate with the Joomla front-end. docs.civicrm.org/sysadmin/en/latest/integration/joomla/forms/… – Phil Morice Brubaker Feb 7 '18 at 17:35
0

Sounds like you also need to update the settings inside your file that points to your Joomla database. I don't know exactly where that is, as I use Drupal. But mine is at /home/username/public_html/sites/default/settings.php. That is where I tell Drupal how to connect to its database. Every CMS I've ever worked with has something similar. Inside that file is a listing of CiviCRM database tables so that your CMS can connect. If you haven't changed it there, then Joomla is still looking for the old database.

Edit:

The lines you're editing in your CMS's settings file would look similar to this below. Unfortunately it doesn't get formatted right when pasting in here, so I've only included the first dozen lines or so.

$databases['default']['default']['prefix']= array(
  'default' => '',
  'civicrm_acl'                              => '`username_civicrm`.',
  'civicrm_acl_cache'                        => '`username_civicrm`.',
  'civicrm_acl_contact_cache'                => '`username_civicrm`.',
  'civicrm_acl_entity_role'                  => '`username_civicrm`.',
  'civicrm_action_log'                       => '`username_civicrm`.',
  'civicrm_action_mapping'                   => '`username_civicrm`.',
  'civicrm_action_schedule'                  => '`username_civicrm`.',
  'civicrm_activity'                         => '`username_civicrm`.',
  'civicrm_activity_contact'                 => '`username_civicrm`.',
  'civicrm_address'                          => '`username_civicrm`.',
  'civicrm_address_format'                   => '`username_civicrm`.',
  • I don't think that's it. I did change the CMS settings.php to point to the dev database, and that is the database that the CiviEvent Listing module is trying to connect to. And, the dev site and other parts of Civi in the dev environment are all functioning normally. – Phil Morice Brubaker Dec 18 '17 at 15:51
  • So you changed a bunch of lines that look like this: $databases['default']['default']['prefix']= array( 'default' => '', 'civicrm_acl' => 'username_civicrm.', 'civicrm_acl_cache' => 'username_civicrm.', 'civicrm_acl_contact_cache' => 'username_civicrm.', 'civicrm_acl_entity_role' => 'username_civicrm.', 'civicrm_action_log' => 'username_civicrm.', 'civicrm_action_mapping' => 'username_civicrm.', – Jenni Simonis Dec 19 '17 at 0:11
  • It should be a very long array that includes the names of all your CiviCRM tables. Unfortunately comments don't format them correctly. I'll add it as an edit above to see if that works better. – Jenni Simonis Dec 19 '17 at 0:12
  • I'm not finding anywhere that Joomla includes an array of db tables. Not that it isn't somewhere, but I am not finding it. I did find some other possibilities, but those didn't help. It's too involved to put in a comment. I'll edit my answer to add those attempts. – Phil Morice Brubaker Dec 19 '17 at 19:47
  • Do you have a menu item like this: CiviCRM Menu >> Administer >> System Settings >> CMS Database Integration – Jenni Simonis Dec 20 '17 at 3:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.