﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
12022,wp-activate.php - Plugin + Activation bug,wpmuguru,,"MU Trac Ticket: http://trac.mu.wordpress.org/ticket/1151

I've seen a few of the other threads about wp-activate.php not working. I want to sorta put more detail. Originally I thought that the wp-activate.php page wasn't pulling in the functions.php cause I noticed that the page stopped loading at a specific point that required a custom function from my functions.php file. But after looking at the half loaded page I could see that it was pulling the load file which calls functions.php, it however is not pulling any dependencies from installed plug-ins, I also checked my php logs and saw that it was trying to pull a non-existent class that is available at all other times.

By default wp-activate.php page includes both the header.php and the footer.php. I found that if you have any functions being executed in the header that require a plug-in be activate, the page will fail and registration will not go through. Resulting in the half loaded page that many other people have gotten.

So as a test, I did:

functions.php

{{{
function foo () { echo 'bar'; };
function a() { // load some function that's dependent on a plug-in }
}}}

When I ran all these functions in the header.php the results were this:

   1. foo(); - success
   2. a(); - fail
   3. gravity_form(1); - fail 

gravity_form() is a function available w/ the gravity forms plug-in put directly into the header.php, and was not located in my functions.php.

As a temporary stopgap I had to do:

{{{
if ( basename($_SERVER['PHP_SELF']) != 'wp-activate.php' ) include('foo.php');
}}}

which keeps the section that had previously had my functions in it from loading if it's trying to activate.

Anyway, I hope this helps someone figure out how to actually fix this issue.

also posted in the forum: http://mu.wordpress.org/forums/topic/15324
",defect (bug),closed,normal,,Multisite,,normal,duplicate,,eddiemoya sboisvert
