You are here

function _acquia_purge_get_diagnosis_conflicts in Acquia Purge 6

Test against known conflicting modules such as varnish, boost and purge.

@returns Associative array with the following elements:

  • title: The name of the requirement.
  • value: The current value (e.g., version, time, level, etc).
  • description: The description of the requirement/status.
  • severity: ACQUIA_PURGE_SEVLEVEL_INFO, _OK, _WARNING, _ERROR

Parameters

string $t: Name of the t() function to call.

File

./acquia_purge.diagnostics.inc, line 97
Self-test diagnostic test functions for _acquia_purge_get_diagnosis().

Code

function _acquia_purge_get_diagnosis_conflicts($t) {
  $test = array(
    'severity' => ACQUIA_PURGE_SEVLEVEL_OK,
    'value' => $t('No issues detected.'),
    'title' => $t('Module conflicts'),
  );

  // Detect expire's "Include base URL in expires" setting, which causes issues.
  if (variable_get('expire_include_base_url', TRUE)) {
    $test['value'] = 'expire';
    $test['severity'] = ACQUIA_PURGE_SEVLEVEL_WARNING;
    $test['description'] = $t("We detected that you enabled the 'Include base" . " URL in expires'-setting offered by the expire module, this is known" . " to (potentially) cause issues. The setting causes hook_expire_cache()" . " to be given full urls that breaks its own API and Acquia Purge is not" . " always able to strip these. Check your logs to see if purges execute" . " properly.");
  }

  // Detect the existence of the Boost module which is incompatible.
  if (module_exists('boost')) {
    $test['value'] = 'boost';
    $test['severity'] = ACQUIA_PURGE_SEVLEVEL_ERROR;
    $test['description'] = $t('Your site has the boost module enabled which is' . ' known to cause issues on Acquia Cloud. Because of its heavy' . ' interactions with the file system it will destabilize your site.');
  }

  // Detect the existence of the Purge module which is incompatible for now.
  if (module_exists('purge')) {
    $test['value'] = 'purge';
    $test['severity'] = ACQUIA_PURGE_SEVLEVEL_ERROR;
    $test['description'] = $t('Your site has the Purge module enabled which' . ' is incompatible with this version of Acquia Purge. However, this' . ' module will depend on it in the future. Please, remove it for now!');
  }

  // Detect if the Varnish module is enabled, which isn't necessary.
  if (module_exists('varnish')) {
    $test['value'] = 'varnish';
    $test['severity'] = ACQUIA_PURGE_SEVLEVEL_WARNING;
    $test['description'] = $t('Your site runs with the varnish module enabled,' . ' which is known to not work on Acquia Cloud. As Acquia Purge does its' . ' work already for you we strongly encourage you to remove it.');
  }
  return $test;
}