• OceanWind

    (@oceanwind)


    I’m running multiple sites on my WordPress 3.1 install, and I’ve noticed a couple of major bugs with wp-activate.php. I’m using subdirectories to host sub-sites (as opposed to subdomains).

    1) When I add a new user to a subsite, it sends them a link to the wp-activate.php within the subsite. This file clearly doesn’t exist and thus generates a Not Found error. For example:

    https://my_domain.com/my_subsite_name/wp-activate.php?key=123456789

    2) Even if I try sending the new user to wp-activate.php at the root level, it just shows a blank page and the user is not activated.

    Aside from the bugs that need to be fixed, does anyone know of a work around for this? I really need this functionality right now.

    Many thanks in advance,

    Bill

Viewing 15 replies - 1 through 15 (of 27 total)
  • Thread Starter OceanWind

    (@oceanwind)

    More on this.

    It appears that wp-activate.php should be available in the subsites. For example, wp-login.php works fine when called from a subsite.

    I desperately need to get higher-level authorizations to some users, and so I turned registration on, and was going to send them directly to the login/register page, thinking I could upgrade their role once they’ve registered.

    wp-login.php works just fine. But when I follow the link to register from within the subsite, the page comes as NOT FOUND.

    Any ideas what this could be?

    Here are the sites:

    https://eatlocalguide.com (this is the main site and redirects to the bouldercounty site below)
    https://eatlocalguide.com/bouldercounty/
    https://eatlocalguide.com/sarasota

    They should be redirected to the main site to register there.

    Thread Starter OceanWind

    (@oceanwind)

    Thanks, Andrea.

    So how would I go about automating this redirection? The email that is auto-sent by WordPress when the administrator adds them sends a URL with subsite info included (e.g., https://eatlocalguide.com/sarasota/wp-activate.php?key=123456789). Is there a way to customize this letter? Or is there a file I can include in my theme or an .htaccess command I could include that would automatically re-direct them?

    And after they’ve signed in, I want to make sure they end up in the admin section for the subsite they’ve been given privileges to (not the main site).

    But beyond that, as I mentioned, both wp-activate.php and wp-signup.php are displaying blank pages right now — and it looks like this is because my theme’s header.php file includes calls from functions.php. What should I do to get this to load properly?

    Your help is greatly appreciated. I know that’s a lot:

    1) How to re-direct
    2) How to make sure after activating or registering, they are sent back to the appropriate site (without altering WordPress code if possible)
    3) How to get functions and classes in functions.php to appear correctly in wp-activate.php and wp-signup.php (and other system files of this nature…)

    Thanks!

    Bill

    Well, here’s the thing…. what you’re asking for is built in.

    they symptoms you’re describing show me there’s a problem.

    1 – they shoudl be redirected already, is my point. rule out all your plugins.

    2 – yeah…. not sure how to do this.

    3 – shouldn’t matter. wp-activate & signup should always be called from the main blog. that’s it.

    further reading:

    https://wpmututorials.com/plugins/style-your-signup-page/

    Thread Starter OceanWind

    (@oceanwind)

    So Andrea, are you saying that the URL in the email that gets sent out to new users should not have the subsite in its activate link, or that it should have it and WordPress should automatically redirect to the root site wp-activate page?

    Thread Starter OceanWind

    (@oceanwind)

    I’ve tried disabling all of my plugins, and I can’t find a conflict there. Assuming the redirection to the main wp-activate.php file is supposed to happen within WordPress, is there a way I can use sunrise.php to make sure this re-direct happens?

    It should not have the substie address in the activate link, no.

    Disable all your plugins. All of ’em. Yes really. Even the ones in mu-plugins.
    upload fresh copies of wordpress if you need to.

    I’m having the same exact problem. I’m running version 3.1. I’m trying to create a rewrite rule on the server for this problem. Anyone know of tutorials for IIS rewrites?

    Thread Starter OceanWind

    (@oceanwind)

    Here’s how I got around this.

    First, I wasn’t able to find a conflict in any of the plugins, and I just upgraded my entire WordPress installation.

    Not having a lot of time to deal with this issue for this client, I enabled sunrise (Add or uncomment the line define( 'SUNRISE', 'on' ); in your wp-config.php file). And then I put the following code in sunrise.php, which lives in your wp-content folder:

    if (preg_match("/(.*)(wp-activate\.php)/",$_SERVER['REQUEST_URI'],$matches))  {
    	if (strlen($matches[1]) > 1) {
    		header("Location: /wp-activate.php?".$_SERVER['QUERY_STRING']);
    		exit;
    	}
    }

    This redirects all requests for wp-activate.php to the main blog.

    Hope that helps.

    You are awesome! Thanks for the help!

    I’m having this problem too — for me the main trouble is that activate.php is plain blank. When users click on the activation link in their e-mail, they get (for instance) https://thatcamp.org/wp-activate.php?key555blahblahbah. For now I’ve disabled user self-registration in Network Settings (it’s not all that necessary for us anyway) and have also installed a great new plugin called “Unconfirmed,” which allows you to approve users via admin screen using the activation link the system sent them: https://www.ads-software.com/extend/plugins/unconfirmed/

    Right now the users will still see nothing when they click their activation link, but with luck I can get that fixed somehow.

    if it is a completely blank white screen, that is a php error. likely a plugin is causing that. turn ’em all off.

    Actually you’re totally right, Andrea_r — I suspected as much when I posted, but hadn’t yet checked. Mostly I thought it’d be useful for others to learn about the admin screen activation option (there are a couple other plugins that do that too.) I found the cuplrit: it was an orphaned Cimy Users Extra Fields file I had forgotten about in wp-content/mu-plugins after uninstalling Cimy Users Extra Fields from wp-content/plugins.

    Jason Paul

    (@jasontrasaterracom)

    I’ve suddenly started having this problem. I have deactivated all plugins yet the blank screen still persists. It’s a Multisite installation as well. Any thoughts?

    I’m trying to remember whether the problem was fixed after I simply deactivated all the plugins or whether I had to actually delete the problem file in mu-plugins — I don’t remember, Jason. But you might try actually deleting all the plugin files in both /plugins and /mu-plugins. After you’ve backed up both directories, of course.

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘wp-activate.php does not work in multi-user site’ is closed to new replies.