5

I've moved a Drupal 6 / CiviCRM 4.3 site to a development server, and I'm getting really strange behavior. When I visit a Drupal page on the copied site, everything renders as expected. However, when I visit a CiviCRM page, the CMS part of the markup is missing from the source. It's almost like every CiviCRM page is being delivered as a snippet.

To be more specific, when I go to /civicrm and view source, I get markup beginning with:

<div id="crm-container" class="crm-container" lang="en" xml:lang="en">

<div id="menu-container" style="display:none;">
  <ul id="civicrm-menu">
  ...

The opening and closing HTML tags, and all the HTML contained in the Drupal theme are entirely absent. The same appears to be true for every CiviCRM page.

I've tried the following:

  • reviewing my CiviCRM settings file
  • reviewing my directory and resource settings
  • clearing Drupal caches
  • emptying sites/default/civicrm/templates_c
  • deleting sites/default/civicrm/ConfigAndLog/Config.IDS.ini
  • running drush civicrm-update-cfg
  • checking error logs for Apache, Drupal, and CiviCRM
  • throwing salt over my left shoulder

Any ideas what might cause such strange behavior? Suggestions for something I might have missed in my migration or a good place to put debugging code to get to the bottom of this?

  • So what's in your logs? Server's error.log, Drupal's watchdog, and whatever it is CiviCRM is using? And have you made sure CiviCRM is actually called at all? If Drupal does not call it, it's Drupal's fault. If it does, but CiviCRM returns nothing, it's not. – Mołot Nov 20 '14 at 8:03
  • Did you have CiviCRM Theme module on at your old location? – petednz - fuzion Nov 20 '14 at 8:48
  • I wonder if you are seeing what's left of an open output buffer after things die in Smarty space? You will have already taken a close look at logs, but look again and make absolutely sure you're seeing all the output you could be. If it's exiting early there should be some notice. Your dev environment might not suit drupal6. Not really an answer sorry :) – Chris Burgess Nov 20 '14 at 9:06
12

Ah, I think I've seen this before, did you by chance mess with your CiviCRM settings file?

Double-check your CIVICRM_UF setting, Civi might be tripping up if it thinks the CMS is something other than what it actually is.

For Drupal 6 you want CIVICRM_UF = 'Drupal6'

  • 2
    The lesson is to minimize the amount of programming you do after midnight. I had indeed somehow managed to set the UF to Drupal instead of Drupal6. Imagine that: CiviCRM needs to know what the CMS is in order to render the CMS chrome. – universalhandle Nov 20 '14 at 16:28
  • Heh ginkgoMZD, if you ask and answer enough questions to get 200 reputation that will help CiviCRM launch its own StackExchange site (area51.stackexchange.com/proposals/77367/civicrm). Cheers, Joe – Joe Murray Nov 20 '14 at 17:31
  • I've had this happen to me before too. It's confusing when everything stops working for no apparent reason, and you're thinking "I must have done something really dumb, but which really dumb thing did I do?" – Coleman Nov 20 '14 at 21:02

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.