Make it more obvious that you must clear cache when moving site

tambetm - August 31, 2007 - 21:08
Project:Path Filter
Version:5.x-1.x-dev
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I moved a Drupal site from test server to live by copying database and all files. Everything seemed to work fine until I noticed that some links are still pointing to test server. I narrowed problem down to Path Filter, but actually this is general Drupal filter issue.

Filters are supposed to be idempotent, ie returning always the same output for the same input. This allows their output to be cached in cache_filter table. Path Filter generally satisfies this condition, but not when moving installation from one server to another. In this case input has not been changed, but output is different, because base_url has changed.

In my case Drupal happily returned cached pages, as they were never changed on the new server. Note that page cacheing was off and this has nothing to do with it. Changing even one letter in text fixed the problem, but changing it back brought the problem back.

Final solution was simple - truncate cache_filter in database. I don't know if Path Filter developers can do anything about this, but I just wanted to document the issue.

#1

RobRoy - August 31, 2007 - 21:19
Title:Wrong links after moving site» Make it more obvious that you must clear cache when moving site

This is documented in the readme and http://drupal.org/node/80681 but you're right that it needs to be more apparent. Ideas/patches welcome.

#2

ztyx - September 15, 2008 - 09:13

Maybe you could save $base_url to a separate variable and see if it changes, and in that case empty the cache? Is this something that could go into core?

Edit: Will read the API correctly next time. Now refering to correct variable.

#3

jjalocha - December 17, 2008 - 14:05

Similar problem with a multilingual site:
If the Language negotiation (admin/settings/language/configure) is changed after enabling Path Filter, the prefixes are not corrected, unless the cache is cleared.

 
 

Drupal is a registered trademark of Dries Buytaert.