[solved] Broke admin changing site URL in config.php, Pages not showing in admin
Posted: Tue Mar 24, 2009 3:40 am
Hello...I'm running CMS Made Simple 1.5.2 "Caguas"...PHP 5.2.6...MySQL 5.0.45. This is all working with Apache 2.2.3 running on Linux (Cloud hosting environment from Mosso.com).
The CMS installation was installed on a testing URL provided by the hosting environment. The testing URL is a subdomain that looks like http://www.mydomain.com/php5-2.dfw1-1.w ... com/.
Pretty much using all the "out of the box" stuff, added FormBuilder module and MySQLDump for backups. I also configured to use mod_rewrite so URLs look like mydomain.com/parent/child.
I built out the site, around 150 pages or so (put a lot of effort into)...and got everything working perfectly (very pleased with the CMS).
With everything complete with the site, the next step was to switch the installation to the live hosting domain. Reading through instructions and forums, this seemed should be as simple as modifying the config.php (file located in the root folder), and updating the $config['root_url'] line with the appropriate URL. ..and of course pointing the domain/DNS to the hosting account.
After making the domain change and updating config.php with the new URL (http://www.mydomain.com), things didn't work right. Some strange behavior including:
1. In the Admin area of the site, when clicking the arrows to expand the pages, would get a "XML response was returned from the server is invalid" and a very large error message (not sure but am guessing was AJAX related to the page arrow movement). So I could not expand the page hierarchy. After the error, if I then refreshed the page...I would then see the expanded pages.
2. The front end of the website was no longer rendering the CSS in Firefox at all. Just copy with no styling. However, it WOULD render fine in IE7 (go figure!) and other browsers. I tested this on multiple machines and other networks to confirm nothing was caching on local browsers. Again prior to changing the config.php, it worked fine in all browsers. Reading in the forums on CSS issues like this, I found that removing the {style} tag CMS used in the template and replacing with a regular hard coded CSS reference fixed the issue. Very strange, but that resolved this issue in Firefox (that again wasn't an issue on the testing URL).
I cleared the cache in Site Admin. Still same issue on #1. I then changed the config.php back to the testing URL, then everything was fine again (no XML error and could navigate and edit pages fine).
At this point I went back and forth changing the config.php, thinking I must have something typed wrong, but didn't see any issues and kept seeing the same issue. Worked fine on the development/testing URL, had issue #1 on the production URL. Slept on it, tried the next day, still same issue.
With the config.php in the "live/production" domain having the issue, I tried adding a new page just to see what it would do. After trying to add a page, it removed everything from the pages section in the admin...clearing out all references in the pages section. So under "Content/Pages" it now just shows a blank white page. It seems something go re-indexed and lost references to the page data. However, all of the pages and content still show fine on the frontend of the site...so the content is there.
Unfortunately now, with the config.php in the testing URL, or the desired production/live URL (tried both), the pages in the admin do not show at all (just a white page).
The front end of the website still shows fine...so again the data is there...just can no longer edit/add anything in the admin.
Any ideas on how to correct this would be greatly appreciated.
Thanks,
Max
The CMS installation was installed on a testing URL provided by the hosting environment. The testing URL is a subdomain that looks like http://www.mydomain.com/php5-2.dfw1-1.w ... com/.
Pretty much using all the "out of the box" stuff, added FormBuilder module and MySQLDump for backups. I also configured to use mod_rewrite so URLs look like mydomain.com/parent/child.
I built out the site, around 150 pages or so (put a lot of effort into)...and got everything working perfectly (very pleased with the CMS).
With everything complete with the site, the next step was to switch the installation to the live hosting domain. Reading through instructions and forums, this seemed should be as simple as modifying the config.php (file located in the root folder), and updating the $config['root_url'] line with the appropriate URL. ..and of course pointing the domain/DNS to the hosting account.
After making the domain change and updating config.php with the new URL (http://www.mydomain.com), things didn't work right. Some strange behavior including:
1. In the Admin area of the site, when clicking the arrows to expand the pages, would get a "XML response was returned from the server is invalid" and a very large error message (not sure but am guessing was AJAX related to the page arrow movement). So I could not expand the page hierarchy. After the error, if I then refreshed the page...I would then see the expanded pages.
2. The front end of the website was no longer rendering the CSS in Firefox at all. Just copy with no styling. However, it WOULD render fine in IE7 (go figure!) and other browsers. I tested this on multiple machines and other networks to confirm nothing was caching on local browsers. Again prior to changing the config.php, it worked fine in all browsers. Reading in the forums on CSS issues like this, I found that removing the {style} tag CMS used in the template and replacing with a regular hard coded CSS reference fixed the issue. Very strange, but that resolved this issue in Firefox (that again wasn't an issue on the testing URL).
I cleared the cache in Site Admin. Still same issue on #1. I then changed the config.php back to the testing URL, then everything was fine again (no XML error and could navigate and edit pages fine).
At this point I went back and forth changing the config.php, thinking I must have something typed wrong, but didn't see any issues and kept seeing the same issue. Worked fine on the development/testing URL, had issue #1 on the production URL. Slept on it, tried the next day, still same issue.
With the config.php in the "live/production" domain having the issue, I tried adding a new page just to see what it would do. After trying to add a page, it removed everything from the pages section in the admin...clearing out all references in the pages section. So under "Content/Pages" it now just shows a blank white page. It seems something go re-indexed and lost references to the page data. However, all of the pages and content still show fine on the frontend of the site...so the content is there.
Unfortunately now, with the config.php in the testing URL, or the desired production/live URL (tried both), the pages in the admin do not show at all (just a white page).
The front end of the website still shows fine...so again the data is there...just can no longer edit/add anything in the admin.
Any ideas on how to correct this would be greatly appreciated.
Thanks,
Max