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) »
  • Problem with separate CiviCRM and CMS (Joomla) databases
Pages: [1]

Author Topic: Problem with separate CiviCRM and CMS (Joomla) databases  (Read 1014 times)

ceford

  • I’m new here
  • *
  • Posts: 20
  • Karma: 2
Problem with separate CiviCRM and CMS (Joomla) databases
October 23, 2009, 04:54:17 am
Being new to CiviCRM I tried it out in Joomla, Drupal and Standalone environments. I entered quite a lot of data in the Standalone environment (then at 2.2.9), then switched to using Joomla and upgraded everything (J to 1.5.14 and Civi to 3.0.1). Following the instructions for migration to another site/server I switched the Joomla version to using what had been the Standalone version's database. So I have two databases - let us call them the Joomla database and the CiviCRM database. That all seemed to work nicely. And then I noticed...

When I make a new entry in the Profiles list or change one of the existing entries the change does not show up in the Joomla menu creation form. I have double checked the front and back end settings values and looked at the both sets of database tables. It seems that the changes I make to the profiles are stored in the CiviCRM database, which is what I want, but the Joomla menu form draws its data from the Joomla database - the tables still being there from the initial installation. I even introduced a misspelling in one of the Profiles so that I can tell which database I am hooked up to!

I have looked through the code and the databases but can't find the point where the Joomla menu form gets its parameters. I have done obvious things like deleting caches, rebuilding menus, and so on. I admit that given a sequence of say ten operations I might not have got the order exactly right - but then I would expect it not to work at all rather than display this odd behaviour. Just thought I would ask and then get on with something else for a while.

Cliff

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 separate CiviCRM and CMS (Joomla) databases
October 23, 2009, 07:44:53 am

the code is here:

JOOMLA_ROOT/components/com_civicrm/views

check the *.xml files in the tmpl directory. Our joomla installer uses the civicrm db in the joomla db and the xml file queries are structured as such. You will need to change those queries to refer to the right db.

one such file is:

components/com_civicrm/views/Events/tmpl/default.xml

if u use the same user/pass in mysql, you can refer the tables as dbname.tablename

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

ceford

  • I’m new here
  • *
  • Posts: 20
  • Karma: 2
Re: Problem with separate CiviCRM and CMS (Joomla) databases
October 23, 2009, 09:46:03 am
Thank you for that explanation. I am sure it will be useful. I only tried to use two databases because someone neurotic about data security asked me if it could be done, with the second database in another building [or town, or country, or planet, ...]. The easy solution was to export the tables from the CiviCRM database and import them into the Joomla database. That worked fine. And I don't fancy inserting database names in all of the xml files!

Cliff

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Problem with separate CiviCRM and CMS (Joomla) databases

This forum was archived on 2017-11-26.