One subsite on my multisite network can view the statistics for all other subsites on my network.

One subsite on my multisite network can view the statistics for all other subsites on my network. All the other subsites are displaying the stats correctly - just this particular subsite. This subsite used to work correctly but now it doesn't so not sure what happened or how to fix it.

So to clarify each subsite should only be able to view the stats for their subsite. This is the ways its been woorking for a while with no problems. However, just recently one subsite can now view the stats for all other subsites (including its own).

So far I have tried:
Changing themes - still not working correctly
Disabling all plugins - still not working correctly

I am really struggling with this one - I appreciate any help/direction anyone can give.

Thank you in advance!

  • SparkPlug

    Hi Ash,

    Well I figured out the problem and have discovered a new bug all together... The problem had to do with the wpmu domain mapping plugin for this particular site.

    I will outline the issue and how I resolved it:

    Our clients are free to add their own domains to their own site within our network using the wpmu domain mapping plugin. In this case the client mapped his own domain and in the field labeled "Front end redirect should be" he selected "disabled and entered domain should be used" from the select box.

    The problem with this is that this option doesn't work as intended and wrecks the clients site because the wordpress function get_option( 'home' ) would return the main domain for the network and not his mapped domain. Because of this he was able to view the stats of all other sites on the network as well as he could not create any new pages or posts or link to any of his media - basically anywhere where get_option( 'home' ) is used would break because it used the wrong domain.

    So to fix the issue I simply changed the "Front end redirect should be" value in the domain mapping section to "directed to mapped (primary) domain" and voila everything is back to normal.

    I am pretty sure this is a major bug with the domain mapping tool because the setting "disabled and entered domain should be used" will always break a clients site with us.

    So while this is fixed as far as my issue is concerned for this particular situation I think we should keep this thread open until the domain mapping plugin gets fixed.

    I have re-granted access in case you want to login and check out the current configurations.

    Thank you for you help in this matter.

  • SparkPlug

    Thanks for looking into this. I can reproduce the error no problem so let me outline the exact steps.

    For this example, I am working in the /yoadev/ subsite.

    From within this subsite click into Tools->Domain Mapping.

    Notice that I have a test domain setup for this sub site already. When I added this test domain I selected "disabled and entered domain should be used" for the field labeled "Front end redirect should be".
    Feel free to remove this test domain and re-add it yourself but make sure that you set "disabled and entered domain should be used"

    Okay now if you go to this URL it appears to work, however...
    Click into Settings->Permalinks notice that all the options listed only show the domain for the main network and not the mapped domain name.

    To show you another place on where things are now broken - try creating a new page or post. Notice how the auto generated url only shows the url of the main network... So if you do create the page and save it you can never view this page as WP can't find it.

    Another example of how things are now broken - click into Media->Library and hover over the "view" link for the image that is there - notice the URL - try clicking it and you won't be able to view it

    There are obviously more examples of where things are broken but I won't list them all. But as I have shown with the domain set this way it renders this sub site broken since you cannot create any pages or posts etc..

    Now if you go back to Tools->Domain Mapping and remove the test domain that is there and re-add it but this time select one of the other options like "directed to mapped (primary) domain" in the field labeled "Front end redirect should be"

    Now go back and check all the broken areas I mentioned and you will see that everything is now working as it should.

    Hope this helps.

  • Sam

    Hi @SparkPlug

    Please note that it reads "Front end redirect should be disabled and entered domain should be used" so if you want the permalinks to show the mapped domain in the admin, you should view the admin with the mapped domain not the main domain, because if you visit the permalinks page with main domain, it won't change the domain since you have chosen " entered domain should be used" so it's using the entered domain which is not your mapped domain ( it can be you mapped domain ). As a result, the newly created posts urls won't show the mapped domain if the post is created with the main domain in the address bar, the same goes with rest of the things you are facing.