function _acquia_purge_diagnostics_acquia_purge in Acquia Purge 7
Acquia Purge.
Parameters
string $t: Name of the t() function to call.
AcquiaPurgeService $service: The Acquia Purge service.
Return value
array 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
- ACQUIA_PURGE_SEVLEVEL_OK
- ACQUIA_PURGE_SEVLEVEL_WARNING
- ACQUIA_PURGE_SEVLEVEL_ERROR <-- blocks Acquia Purge from executing!
1 string reference to '_acquia_purge_diagnostics_acquia_purge'
File
- ./
acquia_purge.diagnostics.inc, line 93 - Diagnostic self-tests and reports that aim to prevent runtime misery.
Code
function _acquia_purge_diagnostics_acquia_purge($t, $service) {
$test = array(
'severity' => ACQUIA_PURGE_SEVLEVEL_INFO,
'value' => ACQUIA_PURGE_VERSION,
'title' => $t('Acquia Purge'),
);
// Detect the existence of the Boost module which is incompatible.
if (module_exists('boost')) {
$test['value'] = $t('Conflicts with: @m', array(
'@m' => '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'] = $t('Conflicts with: @m', array(
'@m' => 'purge (d7)',
));
$test['severity'] = ACQUIA_PURGE_SEVLEVEL_ERROR;
$test['description'] = $t('Your site has the Purge module enabled which' . ' is incompatible with Acquia Purge for Drupal 7. However, the version' . ' for Drupal 8 depends on it, but please remove it on this setup!');
}
// Detect if the Varnish module is enabled, which isn't necessary.
if (module_exists('varnish')) {
$test['value'] = $t('Conflicts with: @m', array(
'@m' => '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.');
}
// Detect if the Domain Access module is enabled, which is recipe for trouble.
if (module_exists('domain')) {
$test['value'] = $t('Conflicts with: @m', array(
'@m' => 'Domain Access',
));
$test['severity'] = ACQUIA_PURGE_SEVLEVEL_WARNING;
$test['description'] = $t('Domain Access allows operating your site on' . ' multiple domain names and slicing content among those domains. This' . ' conflicts with Acquia Purge as editors could update a piece of' . ' content on one domain, which would then get cleared on all domains' . ' that Acquia Purge operates on. On top of this, Acquia Purge operates' . ' a queue which means that DA-domain information gets lost after saving' . ' content. Therefore, unless you are not splitting content with DA, you' . ' are recommended to reconsider your architecture.');
}
// Detect if the shield module is in use.
if (module_exists('shield')) {
$test['value'] = $t('Conflicts with: @m', array(
'@m' => 'Shield',
));
$test['severity'] = ACQUIA_PURGE_SEVLEVEL_WARNING;
$test['description'] = $t('The Shield module is in use on your site and' . ' protects your content with a password. Because Varnish caches these' . ' items differently, the instructions Acquia Purge sends to Varnish' . " will not work. This inconvenience requires you to either disable" . ' Acquia Purge or enable the passivemode setting. Please see' . ' INSTALL.md and https://www.drupal.org/node/2642458 for more info.');
}
return $test;
}