Experimental project

This is a sandbox project, which contains experimental code for developer use only.

This sandbox project is an add-on module for the ctools project.

TLDR:
- This project allows you to move the ctools module's code around your Drupal installation without running into issues.
- Once this module is enabled any time the ctools code is moved all the caches around this will be automatically rebuilt.

Use-Case:
Whenever the ctools module needs to be moved, for example:
- when being patched, moving to the sites/all/modules/patched directory
- when another developer has misplaced it and you want to move it to sites/all/modules/contrib
- any other reason for moving this code around
there are database issues with the ctools and Drupal caches. These cannot be simply resolved with a clear cache.

Purpose:
To allow developers to easily move the ctools directory during site development or upgrade.

How does it work?
This module loads itself before any ctools code is initialised and runs some tests to see if the actual directory is in a different place than where Drupal thinks it is, if so, all the caches are automatically cleared.

Install instructions:

  • Download the module
  • Enable the module
  • You are now free to move the ctools directory

How to use it:

  • If this module is enabled before ctools is moved then it will simply 'just work'.
  • If you are starting after it's already damaged, follow these steps
    1. Download the module
    2. If you have drush, run:
      drush php-eval "module_load_include('module', 'ctools_helper', 'ctools_helper'); ctools_helper_run_fix();"
    3. If you don't have drush (eg FTP only) then add the following two lines into your index.php file:
      require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
      drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
      +module_load_include('module', 'ctools_helper', 'ctools_helper');
      +ctools_helper_run_fix();
      menu_execute_active_handler();
      

Project information