Wow, that was a fun little adventure.
I could not figure out for the life of me why the QM overlay for modX was not working. When you’re logged in as admin on the backend then when you preview a page you’re supposed to get what’s called the “Quick Manager” overlay at the top. I was getting this when inexplicably it disappeared and I was only able to get it to come back here and there. I could not figure out what caused it to work and what caused it not to work specifically.
Here’s some pics just to make this look nice:
This is without the QM overlay.
Here it is with the QM overlay before it is extended when you hover over it (the thin little darker strip at the top)
Here it is fully extended.
So, I went through A LOT to finally figure it out. I tested it on valleywideplumbing.com with my firefox browser by backing up the DB and the templates folder and putting them into a fresh installation on that domain. I avoided interrupting the production environment because right now it is set up statically with .html files and the apache web server is set to give precedence to .html extensions over .php. The modX engine works beginning with the index.php file which is located in the root folder for your modX installation. So, since there was an index.html file there it did not matter that the index.php file was there because the .html is what was displayed. That’s how I was able to test this in parallel with the production site running.
Anyway, from my MANY different tests I was convinced there was something wrong with my firefox install. I completely uninstalled firefox together with searching through the registry and removing any references to firefox and mozilla there. I did back up my extensions, passwords, etc. with MozBackup which I am very glad I did as it was a huge time saver. After all of that I got it to work and I thought “problem solved”. But then it went back to not coming up again.
**Tld = “Top Level Domain”
Finally I discovered the difference. For Valleywideplumbing.com the mod_rewrite 301 redirect for valleywideplumbing.com -> www.valleywideplumbing.com was working correctly including for the tld**/manager/ folder. For some reason the redirect was not working correctly for brinformation.com for the tld/manager folder. I had worked on this extensively before and could not figure out how to get it to work. It would redirect for the tld and other folders that were created via the “#friendly urls” mod_rewrite rules, but would not for manager. Anyway, I copied what was set up for valleywideplubming and finally got it working for brinformation.
So, that was the problem. You HAVE TO log in to the manager using the domain name that you have configured within modx. Ie: www.brinformation.com if that’s how it’s set up in modx, or just brinformation.com if that’s how it’s set up. The [(site_url)] system variable is created via the config.inc.php file which resides in /manager/includes/ and is generated with the following line of code (within config.inc.php)
$site_url .= $_SERVER['HTTP_HOST'];
So, it pulls it from the apache $_SERVER['HTTP_HOST'] variable which is based on what was requested by the user-agent (me in this case.. Or my browser on my behalf technically). So, since I was putting in “brinformation.com/manager” and it wasn’t getting rewritten properly to www.brinformation.com/manager then when previewing the pages the url was being written correctly with the preceeding www. and so the http_host variable was different between the http://brinformation.com/manager and the http://www.brinformation.com/index.php?id=1 (or whatever page id we’re previewing)
Whew. I think that makes sense. Even if it doesn’t, it’s fixed! Woohoo!




