Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
As the autoload module doesn't load the classes for tests, it is impossible run any test. Here is PHP trace:
PHP Fatal error: Class 'Notifications_Queue' not found in /www/htdocs/drupal6/sites/all/modules/contrib/notifications/notifications.module on line 2075
PHP Stack trace:
PHP 1. {main}() /www/htdocs/drupal6/index.php:0
PHP 2. menu_execute_active_handler() /www/htdocs/drupal6/index.php:17
PHP 3. call_user_func_array:{/www/htdocs/drupal6/includes/menu.inc:350}() /www/htdocs/drupal6/includes/menu.inc:350
PHP 4. system_batch_page() /www/htdocs/drupal6/includes/menu.inc:350
PHP 5. _batch_page() /www/htdocs/drupal6/modules/system/system.admin.inc:1829
PHP 6. _batch_do() /www/htdocs/drupal6/includes/batch.inc:33
PHP 7. _batch_process() /www/htdocs/drupal6/includes/batch.inc:105
PHP 8. call_user_func_array:{/www/htdocs/drupal6/includes/batch.inc:189}() /www/htdocs/drupal6/includes/batch.inc:189
PHP 9. _simpletest_batch_operation() /www/htdocs/drupal6/includes/batch.inc:189
PHP 10. DrupalTestCase->run() /www/htdocs/drupal6/sites/all/modules/contrib/simpletest/simpletest.module:178
PHP 11. notificationAdminUiTest->setUp() /www/htdocs/drupal6/sites/all/modules/contrib/simpletest/drupal_web_test_case.php:486
PHP 12. DrupalWebTestCase->setUp() /www/htdocs/drupal6/sites/all/modules/contrib/notifications/tests/notifications_admin_ui.test:24
PHP 13. drupal_cron_run() /www/htdocs/drupal6/sites/all/modules/contrib/simpletest/drupal_web_test_case.php:1293
PHP 14. module_invoke_all() /www/htdocs/drupal6/includes/common.inc:2813
PHP 15. call_user_func_array:{/www/htdocs/drupal6/includes/module.inc:497}() /www/htdocs/drupal6/includes/module.inc:497
PHP 16. notifications_cron() /www/htdocs/drupal6/includes/module.inc:497
PHP 17. notifications_queue() /www/htdocs/drupal6/sites/all/modules/contrib/notifications/notifications.module:1379
Proposed resolution
Fix the hook_cron by checking availability of class.
Remaining tasks
1. Patch
User interface changes
N/A
API changes
N/A
Comments
Comment #1
vijaycs85