• Hi,

    I have a lot of WPMU Blogs and they all work fine. But today I noticed, that the Post Preview will not work with activated WPMU Domain Mapping Plugin. If I deactivate the Plugin, it works just fine.

    When I push the button “Preview” it will open a new tab with the url of the post and appended “?preview=true”.

    Can you please fix the problem?

    Thanks a lot.

    Best regards.

Viewing 15 replies - 16 through 30 (of 33 total)
  • multimule

    (@multimule)

    Well that’s the question I am asking. But don’t bother to answer – for explaining the problem thoroughly I am getting nothing but snippy comments here.

    I’m sorry you feel Ron’s comments are snippy – often text on the screen does not communicate tone.

    It’s a valid question. Why are users logged out of the mapped domain?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    If, however, I log in to mappeddomain.com _in addition_ then I may
    1. go to blog.examplenetwork.com’s backend,
    2. hit “preview” there
    3. be redirected to http://mappeddomain.com/?p=123&preview=true
    4. see the preview, as it’s now possible due to the fact that I am logged in to mappeddomain.com too.

    Bolded because that caught my eye.

    I’m not the best at this plugin, but I was under the impression that when you turned on remote admin, you no longer go to mappeddomain.example.com/wp-admin for the backend of your site, but mappeddomain.com/wp-admin

    All that said.

    If you turned on Remote Login at any point in the middle of all this, log off. DELETE your cookies, log back on. See if that helps. Browsers (like Chrome) are often idiots when it comes to this.

    Plugin Author Ron Rennick

    (@wpmuguru)

    Well that’s the question I am asking. But don’t bother to answer – for explaining the problem thoroughly I am getting nothing but snippy comments here.

    Sorry, that wasn’t the intent. You said above that if the user logs out of the mapped domain you see the issue. So, I was legitimately asking why are the users logging out of the mapped domain.

    Secondly, I’ve explained that unless the user is logged into the mapped domain the preview will not work on a preview link for said mapped domain. That’s not something that can be fixed in the DM plugin.

    The user needs to be logged in for security reasons. I doubt most WP site owners want WP to show post previews to anyone who has the URL for it.

    I can confirm I was experiencing the same issue.

    To summarize:

    Steps to reproduce:

    1. The URL http://mysite.com/wp-admin automatically redirects to http://mysite.network.com/wp-admin where you can login.
    2. Edit a new page or post and hit Preview. The preview URL is: http://mysite.network.com/?page_id=123&preview=true
    3. The DM plugin automatically redirects to http://mysite.com/?page_id=123&preview=true. This fails with a 404 – probably because the login cookie doesn’t exist on that domain (the preview works if the primary mapping domain is set to http://mysite.network.com/).

    However, if you untick “Redirect administration pages to site’s original domain” in the network settings, no redirects will occur and previews will work.

    multimule

    (@multimule)

    Thanks, ceeb – you explained the issue much better than I was able to πŸ™‚

    @ceeb: Unticking the “Redirect administration pages …” works because then a user is logged in (only) to the mapped domain (-> BUT no quick switching between blogs in the network possible)

    @ron: Allright. Of course, nobody but logged in users shall be able to preview. What I mean is that users who are logged in to http://mysite.network.com/ are unable to view http://mysite.com/?page_id=123&preview=true (as described by @ceeb) and will not see the admin bar.

    Secondly, I’ve explained that unless the user is logged into the mapped domain the preview will not work on a preview link for said mapped domain.

    If that is definitely impossible – what is the “Remote Login” checkbox meant for / doing?

    @ipstenu: The variant you describe needs unticking “Redirect administration pages …” (see above) which works, but is unintended in the current case.

    @andrea_r: You are right. Thanks for clarifying!

    Plugin Author Ron Rennick

    (@wpmuguru)

    what is the “Remote Login” checkbox meant for / doing?

    Having that checked would mean the preview would work as long as the user doesn’t log out of the mapped domain.

    multimule

    (@multimule)

    Having that checked would mean the preview would work as long as the user doesn’t log out of the mapped domain.

    Did you try that?

    I am asking, because the checkbox “Redirect administration pages …” has to be ticked in order to be able to tick “Remote Login” as well.

    But how can one log in to the mapped domain if administration pages (incl. login page) are on the original (network) domain?

    Plugin Author Ron Rennick

    (@wpmuguru)

    Did you try that?

    Yes.

    If that’s checked (and the redirect admin pages is checked) at the time the user logs in the DM plugin works a little magic to log the user into the mapped domain at the same time they are logging into the admin area.

    multimule

    (@multimule)

    Cool. It seems we tracked down the bug description at least b/c that’s exactly what’s failing here πŸ™‚

    ceeb, can you confirm that this is also what you had experienced?

    Ron, is there any additional setting – in Apache maybe (?) – necessary in order to make that work?

    Plugin Author Ron Rennick

    (@wpmuguru)

    Ron, is there any additional setting – in Apache maybe (?) – necessary in order to make that work?

    To reiterate, you need to either

    – have both the redirect admin pages & remote login checked or
    – have both the redirect admin pages & have the user log into the remote domain manually

    There isn’t a server setting you can change. Unless the user is logged into the remote domain, WP will not generate a post preview.

    Plugin Author Ron Rennick

    (@wpmuguru)

    Your user may have security software which is preventing the remote login script from working. If you could track down a browser error that would be helpful.

    multimule

    (@multimule)

    I tried FF5’s “safe mode” (all plugins disabled) on Ubuntu and IE7 on WinXP – both failed.

    besson3c

    (@besson3c)

    Hello,

    I’m being affected by this problem too, but if you don’t mind I wouldn’t mind clarification on the following overall summary of where things stand:

    The problem is that the WordPress Network doesn’t see users as being logged into their mapped domain when they are logged into the primary top level administrative domain, even with the Domain Mapping Remote Login checkbox checked (as mine is).

    If this is indeed accurate, is there not much that can be done ever? Is it even possible to set a cookie on the mapped domain when this domain is not being accessed at login time? Or, is this a known issue being worked on?

    If I’m understanding things correctly and there is a way to set cookies for arbitrary domains, I might poke around the plugin code to see if I can come up with a fix, but I figured it would be best to first check in with you guys to make sure I have a handle on the overall situation.

    Thanks in advance for your attention!

    Plugin Author Ron Rennick

    (@wpmuguru)

    Have you upgraded to the latest version?

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘Post Preview does not work’ is closed to new replies.