#16776 closed defect (bug) (wontfix)
Preview broken on mapped domains with multisite-/network-install when privacy settings are strict
Reported by: | stealingisbad | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | 3.1 |
Component: | Multisite | Keywords: | |
Focuses: | Cc: |
Description
Given:
- a multisite install at example.org configured for sub-domains
- a blog called "foo" at foo.example.org
- a domain mapping www.foo.com -> foo.example.org
- www.foo.com set as PRIMARY domain for that blog
There are different ways to set this up. While some break the preview altogether, some deny remote logins and thus require entering credentials over and over again.
Here is the setup which "only" breaks the preview if the privacy settings require login to simply view a blog (private blog):
Set these two checkboxes:
Tools > Domain Mapping > Remote Login & Redirect administration pages to site's original domain (remote login disabled if this redirect is disabled)
At the specific blog:
- Network Admin > Sites > BLOGNAME > Edit
- Under "Info" > Domain: foo.example.org (if set to www.foo.com it would deny remote logins)
- Under "Settings" > Siteurl: foo.example.org (if set to www.foo.com it would deny remote logins
- Under "Settings" > Home: www.foo.com (setting this to foo.example.org breaks the preview)
The above works nice for most situations. It allows the super admin to conviniently switch between sub-sites and preview works for public sites.
The ERROR:
For private sites (login required to view contents), the problem forms like this:
- Super Admin is logged in to foo.example.org and edits a Post
- The "Preview" button links to (e.g.) http://www.foo.com/?p=47&preview=true
- Clicking that button tries to open the respective URL, BUT ...
- ... that URL is redirecting to http://foo.example.org/wp-login.php in order to request a login (note the Redirect administration pages to site's original domain above in combination with the strict privacy setting)
- Now, even if you login correctly, the original preview-link will be forgotten and you'll land back at the Dashboard (at http://foo.example.org/wp-admin/)
As a result, currently the admin has to decide on one of three "evils":
- denied previews altogether
- denied remote logins (no fast switching between blogs)
- denied previews for restricted blogs
This is something that we're probably not going to fix as it pertains to a plugin, not core.