diff --git a/advagg.install b/advagg.install index 30ba93a..ac4d8ba 100644 --- a/advagg.install +++ b/advagg.install @@ -250,7 +250,7 @@ function advagg_requirements($phase) { $requirements['advagg_css_path'] = array( 'title' => $t('Adv CSS/JS Agg - CSS Path'), 'severity' => REQUIREMENT_ERROR, - 'value' => $t('CSS directory is not created or writable'), + 'value' => $t('CSS directory is not created or writable.'), 'description' => $t('%path is not setup correctly.', array('%path' => $css_path)), ); } @@ -258,7 +258,7 @@ function advagg_requirements($phase) { $requirements['advagg_js_path'] = array( 'title' => $t('Adv CSS/JS Agg - JS Path'), 'severity' => REQUIREMENT_ERROR, - 'value' => $t('JS directory is not created or writable'), + 'value' => $t('JS directory is not created or writable.'), 'description' => $t('%path is not setup correctly.', array('%path' => $js_path)), ); } @@ -285,10 +285,10 @@ function advagg_requirements($phase) { $item = menu_get_item($css_path[1] . '/test.css'); if (empty($item['page_callback']) || strpos($item['page_callback'], 'advagg') === FALSE) { $item = str_replace(' ', '    ', nl2br(htmlentities(print_r($item, TRUE)))); - $requirements['advagg_async_generation_menu_issue'] = array( + $requirements['advagg_async_generation_menu_issue_css'] = array( 'title' => $t('Adv CSS/JS Agg - Async Mode'), 'severity' => REQUIREMENT_WARNING, - 'value' => $t('Flush your caches'), + 'value' => $t('Flush your caches.'), 'description' => $t('You need to flush your menu cache. This can be done at the top of the performance page. If this does not fix the issue copy this info below when opening up an issue for advagg:
!info', array( '@performance' => url('admin/config/development/performance'), '!info' => $item, @@ -298,10 +298,10 @@ function advagg_requirements($phase) { $item = menu_get_item($js_path[1] . '/test.js'); if (empty($item['page_callback']) || strpos($item['page_callback'], 'advagg') === FALSE) { $item = str_replace(' ', '    ', nl2br(htmlentities(print_r($item, TRUE)))); - $requirements['advagg_async_generation_menu_issue'] = array( + $requirements['advagg_async_generation_menu_issue_js'] = array( 'title' => $t('Adv CSS/JS Agg - Async Mode'), 'severity' => REQUIREMENT_WARNING, - 'value' => $t('Flush your caches'), + 'value' => $t('Flush your caches.'), 'description' => $t('You need to flush your menu cache. This can be done near the top of the performance page under Clear cache. If this does not fix the issue copy this info below when opening up an issue for advagg:
!info', array( '@performance' => url('admin/config/development/performance'), '!info' => $item, @@ -309,6 +309,64 @@ function advagg_requirements($phase) { ); } + // Check to see if any incompatible modules are installed. + if (module_exists('agrcache')) { + $requirements['advagg_module_agrcache'] = array( + 'title' => $t('Adv CSS/JS Agg - Aggregate cache module'), + 'severity' => REQUIREMENT_ERROR, + 'value' => $t('The Aggregate cache module is incompatible with AdvAgg.'), + 'description' => $t('You need to uninstall the agrcache module or uninstall AdvAgg.'), + ); + } + if (module_exists('bundle_aggregation')) { + $requirements['advagg_module_bundle_aggregation'] = array( + 'title' => $t('Adv CSS/JS Agg - Bundle aggregation module'), + 'severity' => REQUIREMENT_ERROR, + 'value' => $t('The Bundle aggregation module is incompatible with AdvAgg.'), + 'description' => $t('You need to uninstall the bundle_aggregation module or uninstall AdvAgg.'), + ); + } + if (module_exists('core_library')) { + $requirements['advagg_module_core_library'] = array( + 'title' => $t('Adv CSS/JS Agg - Core Library module'), + 'severity' => REQUIREMENT_ERROR, + 'value' => $t('The Core Library module is incompatible with AdvAgg.'), + 'description' => $t('You need to uninstall the core_library module or uninstall AdvAgg.'), + ); + } + + // Make sure some modules have the correct patches installed. + if (module_exists('css_emimage')) { + $file_path = drupal_get_path('module', 'css_emimage'); + if (!file_exists($file_path . '/css_emimage.advagg.inc')) { + $requirements['advagg_module_css_emimage_patch'] = array( + 'title' => $t('Adv CSS/JS Agg - CSS Embedded Images module'), + 'severity' => REQUIREMENT_ERROR, + 'value' => $t('The CSS Embedded Images module needs to be updated.'), + 'description' => $t('CSS Embedded Images needs to be upgraded to version 1.3 or higher, the currently installed version is incompatible with AdvAgg.', array('@link' => 'http://drupal.org/project/css_emimage')), + ); + } + } + if (module_exists('cdn')) { + $file_path = drupal_get_path('module', 'cdn'); + if (!file_exists($file_path . '/cdn.advagg.inc')) { + $requirements['advagg_module_cdn_patch'] = array( + 'title' => $t('Adv CSS/JS Agg - CDN module'), + 'severity' => REQUIREMENT_ERROR, + 'value' => $t('The CDN module needs a patch to be compatible with AdvAgg.'), + 'description' => $t('You need to install the latest patch in this issue.', array('@link' => 'http://drupal.org/node/1942230')), + ); + } + elseif (variable_get(CDN_BASIC_FARFUTURE_VARIABLE, CDN_BASIC_FARFUTURE_DEFAULT)) { + $requirements['advagg_module_cdn_farfuture'] = array( + 'title' => $t('Adv CSS/JS Agg - CDN module'), + 'severity' => REQUIREMENT_WARNING, + 'value' => $t('The CDN module and farfutre do not work together currently.'), + 'description' => $t('You need to disable CDN Far Future expiration on the CDN details configuration page, or uninstall AdvAgg.', array('@link' => url('admin/config/development/cdn/details'))), + ); + } + } + // Make sure http requests will work correctly. advagg_install_check_via_http($requirements);