I moved a site from a development server to a production server. It turns out that for some reason on the development server, the ctools module is located in sites/all/modules**/contrib**/ctools - where on the production server the ctools module is located at sites/all/modules/ctools.

I get these errors over and over:

User warning: The following module has moved within the file system: ctools. In order to fix this, clear caches or put the module back in its original location. For more information, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1143 of /home/www/drupal/includes/bootstrap.inc).

User warning: The following module has moved within the file system: views_content. In order to fix this, clear caches or put the module back in its original location. For more information, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1143 of /home/www/drupal/includes/bootstrap.inc).

User warning: The following module has moved within the file system: page_manager. In order to fix this, clear caches or put the module back in its original location. For more information, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1143 of /home/www/drupal/includes/bootstrap.inc).

I already tried the following:

  • When I clear the cache, the errors are gone for a few minutes, but then they come back.
  • I tried changing the path in the system table. But they are changed back after a litle while.
  • I tried deactivating the modules, and activating them again.
  • I have installed the “Module Missing Message Fixer” module, but it shows no errors.
  • I did a "sudo drush cc all" - it had the same temporery effect as clearing cache through Drupal.
  • I did not uninstall the ctools module, because it requires that I also uninstall Panels, Views and several other modules, where I have l lot of data I don't want to loose.

I’m not sure what triggers the errors - as mentioned they disappear for a while when clearing the cache - but then reappears after a while. Running cron does not make them reappear, neither does update.php, clearing the cache or enabling new modules..

How can I get rid of these errors once and for all?

Comments

vm’s picture

have you tried moving the folder back to sites/all/modules?

Sleeepy’s picture

Maybe I was not clear enough in my original post. :)

On the production server (to which I moved the site) the ctools module is in sites/all/modules/ctools. But on the development server it was in sites/all/modules/contrib/ctools.

I can not move the module on the production server, there is other sites running live on that server. So the module has to stay in sites/all/modules.

vm’s picture

The folder wouldn't have moved itself. As such, I suggest working backwards and determining how you will realign the folders to mirror dev or prod.

You can disable modules in D7 without uninstalling them. This allows the data to remain intact. After realigning the folder structure, clear cache, and enable the disabled modules. May not be a bad idea to run update.php to force a scan.

Sleeepy’s picture

I am not sure what you want me to do - I can not move any folders on the prod server. Disabling and re-enabling the modules does not remove the error, neither does running update.php. I already tried that. 

vm’s picture

Then you're only other option is to continue to try and tackle this in the database. No idea how you will do that. I'd correct the issue that I or my dev team created. The folder did not move on its own. dev should have mirrored prod. You can't move it on the production server, fine. Move it on dev and repush to prod.

Sleeepy’s picture

No, but the folder is located in another location at the production server - the folder did not move, the site did.

I know that the folder is located wrong at the dev server.. But since the prod server is where I moved the site, and other sites is on that server, I can not change the folder structure on that server.

vm’s picture

I don't see any other way to tackle this issue. Not sure what is stopping you from realigning production server but if that is set in stone then ..... I'm out of ideas beyond hacking away at the database which presents its own issues.

As an aside, are you sure there aren't 2 ctools folders in play here? I've seen that occur in the past.

Sleeepy’s picture

I have 6 other sites on the production server - if I move the Ctools module, i'm afraid that the same issue would appear on these 6 sites, instead of on the one site I moved from dev?

vm’s picture

are they multisite installs sharing a single code base? if not, then it won't be an issue. If they are a multisite install sharing a single code base ..... IMO, you need to start the work over in dev and insure that the folder isn't moved during development.

Sleeepy’s picture

Yes they share the code. :)

I was not paying attention to the location of the ctools module when developping the site. Now there are months of work done - so starting over would be... bad. :D

vm’s picture

weren't using version control so that you can roll iterations out quicker ? If not, may want to follow this best practice as it would have also aided in determining when the folder was moved.

That said, I remain confused as to why you can't realign the folders in -dev to match prod. Correct -dev as it will now have the error but will at least be aligned with the remainder of the multisites in prod. After correcting the error which is now in -dev NOT in prod, then you can move the site back to prod and its realigned as needed.