WordPress.org

Ready to get started?Download WordPress

Forums

wp-activate.php does not work in multi-user site (28 posts)

  1. OceanWind
    Member
    Posted 3 years ago #

    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:

    http://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

  2. OceanWind
    Member
    Posted 3 years ago #

    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:

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

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

  4. OceanWind
    Member
    Posted 3 years ago #

    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., http://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

  5. 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:

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

  6. OceanWind
    Member
    Posted 3 years ago #

    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?

  7. OceanWind
    Member
    Posted 3 years ago #

    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?

  8. 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.

  9. leopardo956
    Member
    Posted 3 years ago #

    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?

  10. OceanWind
    Member
    Posted 3 years ago #

    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.

  11. leopardo956
    Member
    Posted 3 years ago #

    You are awesome! Thanks for the help!

  12. amandafrench
    Member
    Posted 2 years ago #

    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) http://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: http://wordpress.org/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.

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

  14. amandafrench
    Member
    Posted 2 years ago #

    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.

  15. Jason Paul
    Member
    Posted 2 years ago #

    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?

  16. amandafrench
    Member
    Posted 2 years ago #

    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.

  17. amandafrench
    Member
    Posted 2 years ago #

    And then adding them back in one at a time, of course.

  18. And a blank white screen is always a php error, so check those error logs too.

  19. Jason Paul
    Member
    Posted 2 years ago #

    This is the error I get but it's out of my depth:

    uncaught exception: [Exception..."Component returned failure code:0x80070057 (NS_ERROR_ILLEGAL_VALUE)[nslWebNavigation.loadURI]" nsresult:"0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: chrome://global/content/viewSource.js :: viewSource :: line 179" data:no]

    Any advice you can shed on this would be incredibly helpful. It's also really strange to me that this was working fine a few days ago and I don't recall installing any plugins since then.

  20. Check it in Firefox too?

  21. Jason Paul
    Member
    Posted 2 years ago #

    That error code actually came out of Firefox

  22. Whao really? saw the chrome mention in it.

  23. Jason Paul
    Member
    Posted 2 years ago #

    I thought that was strange too, but it's straight out of Firefox :/

  24. Do you have any caching turned on? Maybe a cached page has that error...

  25. Jason Paul
    Member
    Posted 2 years ago #

    I dunno. Got the same blank screen in chrome and I don't use chrome much. No caching plugins. Still a dev site.

  26. Start checking error logs and disabling plugins.

  27. amit_clavib
    Member
    Posted 2 years ago #

    HI GUYS
    Is there anyway we can use the activation link to activate an user account.

    Like when the user will log in , the user will receive an activation link in his email.

    The user will click it to activate the account

    I am using a multisite

  28. amit_clavib - When the user registers they get an activation link.

    If you need further help, please make a new topic for yourself. This one is abotu a different matter.

Topic Closed

This topic has been closed to new replies.

About this Topic