Hi QROkes,
Firstly thanks heaps for your awesome product.
I've just come across this issue as well. When mapping a domain after SSL has been setup on the root domain the URL of the root domain gets changed in wp_options.
When mapping a domain without SSL everything works fine.
Hopefully these steps are detailed enough to verify.
sudo site myrootdomain.com -wp=default
sudo site myrootdomain.com -multisite-convert (set up with subdomains)
Create a new site called test.myrootdomain.com
sudo site seconddomain.com -parked=myrootdomain.com -domain-mapping-wp-id=2 (where 2 = test.myrootdomain.com)
I can then do
sudo site myrootdomain.com -ssl=on -wildcard
sudo site seconddomain.com -ssl=on -root=myrootdomain.com
And all is fine. Verified by wp site list
blog_id url
1 https://myrootdomain.com
2. https://seconddomain.com
However if I follow these steps :
sudo site myrootdomain.com -wp=default
sudo site myrootdomain.com -ssl=on -wildcard
sudo site myrootdomain.com -multisite-convert (set up with subdomains)
Create a new site called test.myrootdomain.com
sudo site seconddomain.com -parked=myrootdomain.com -domain-mapping-wp-id=2 (where 2 = test.myrootdomain.com)
The URL of the blog ID 1 gets changed to seconddomain.com
ie. I run wp site list
blog_id url
1 http://seconddomain.com
2 http://test.myrootdomain.com
NB. It does the same thing if I do it without the -domain-mapping-wp-id switch and map it manually.