I want to build a page of links that will let me login to edit a specific MSM (Multi Site Manager) site. Instead, EE opens the site I was editing last. This has often resulted in adding templates to the wrong site and then having to move them. Or editing content on the wrong site. Making changes and not seeing them on the site. Or being very confused when trying to edit content because I can't find it.
We're using ExpressionEngine 2.7.3 with Multi Site Manager 2.1.6 - and we've renamed admin.php for security purposes.
What I've Tried
I looked at:
Creating Custom CP Links to Other Site Channels in MSM with Zoo Flexible Admin
which discusses the commented-out base64 page
parameter. Since I'm not interested in loading a specific page, I'm not terribly worried about that functionality. But the question seems to indicate that I can build a link with C=sites&site_id=1
to switch to site 1. This doesn't quite work for me.
So next, I examined the msm_sites links. This revealed that the link to switch to a site is constructed as described in the question above, but with additional parameters. Here's all of them, with some bogus values:
S=QSBsb25nIHRpbWUgYWdvLCBpbiBhIGdhbGF4eSBmYXIsIGZhciBhd2F5
D=cp
C=sites
site_id=1
page=TGl2ZSBsb25nIGFuZCBwcm9zcGVy
Exploration reveals that the S
("session" I'm guessing) parameter is probably the value of {cp_session_id}
. I can't include that in my link, because it will only be good during the current session. I'm guessing the D
param is for "destination" or something. And D=cp
looks good to me. The C
("controller" maybe?) and site_id
parameters look promising, so I include those. And since I don't care about which page I end up on, I leave out the page
parameter as well, leaving me with an HREF that looks like:
http://ee.example.com/notadmin.php?D=cp&C=sites&site_id=1
However, when I load this URL and log in, I end up at the control panel for the site I was editing last. Much sadness. Very growl. My best guess is that EE is discarding my request to switch sites because I don't provide the S
parameter. I don't know how to get around this.
My partial solution is creating an accessory that color codes the control panel background to improve the chances that I'll notice I'm working in the wrong site. But I'd really like to be able to use my handy page-full-of-links method. Any suggestions?