Hiya
I’m tearing my hair out here!
I’ve got a setup where I dev and make modx changes on one machine, then I do a mysql dump and copy all the files to the live web server.
This all works fine, except a page that was created (id=62) can’t be viewed... I’ve just tried creating another new page and rolling that across and its the smae problem.
The symptoms are:
1) The page that links to the new page has its link set to [~62~] This should be replaced with mysubsection/mypage.html but actually gets replaced with 62.html
2) The page is not viewable using /62.html /mysubsection/62.html or /mysubsection/mypage.html
3) The cache file is not created (the cache is cleared when on the new machine and works fine for other pages)
4) All the other pages on the site work correctly
5) The pages entries in the mysql table modx_site_content all match up with other pages. Is there another table that I should check that could affect this?
I’ve tried re-releasing a few times (and by adding a new page and trying that) but nothing seems to make this page spring into live. It is published and the dates on the live server are correct... umm..!?
Thanks in advance,
Neil
p.s.
No tables about 1MB (modx_sie_content is 11k)
MODx 1.0.2
PHP 5.2.6-1+lenny3 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 26 2009 20:09:03)
Server version: Apache/2.2.9 (Debian)
Debian 5.0.3
Doh!
I have to hold my hands up and admit to the solution as I’ve just found the problem!
As I’m storing the MODx along with my code in svn, so I excluded the MODx cache and then re-copied it from an original version.. this was the fatal error! The file siteCache.idx.php contains a list of all the pages and this must be modified whenever you add a page..
So - because I was copying an old version of siteCache.idx.php, there was an old version of the page list.
So my next question is:
Is there a better solution for svn and the MODx cache than clearing the cache before every commit?
Neil
-
MODX Staff
- 10,725 Posts
Yes, don’t version the files in assets/cache/. Use svn:ignore to exclude the whole cache directory from your SVN repository.
Hmm - but thats what caused my original problem. I don’t think that MODx will create the files it contains and if I just use a standard siteCache.idx.php then modx can’t find the pages.
So I don’t understand how it could work if I exclude the whole folder?
-
MODX Staff
- 10,725 Posts
Don’t delete them, leave them alone. After you migrate everything that is included in your repository, just trigger a cache refresh. You can do so manually or via script it if you want.