[wp-trac] [WordPress Trac] #12145: Enhance activation process to improve integration with site theme (was: wp-activate.php creates many notices on load due to theme hackery)

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 11 11:21:05 UTC 2012


#12145: Enhance activation process to improve integration with site theme
-------------------------+-----------------------------
 Reporter:  dd32         |       Owner:  westi
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Multisite    |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  multisite    |
-------------------------+-----------------------------
Changes (by westi):

 * type:  defect (bug) => enhancement
 * component:  Warnings/Notices => Multisite


Old description:

> an example to start:
> {{{
> Notice: Trying to get property of non-object in G:\www\ho.st\wp-includes
> \comment-template.php on line 777
>
> Notice: Trying to get property of non-object in G:\www\ho.st\wp-includes
> \comment-template.php on line 794
>
> Notice: Trying to get property of non-object in G:\www\ho.st\wp-includes
> \general-template.php on line 1588
>
> Notice: Trying to get property of non-object in G:\www\ho.st\wp-
> includes\query.php on line 2600
> Notice: Trying to get property of non-object in G:\www\ho.st\wp-
> includes\query.php on line 2600
>
> Notice: Trying to get property of non-object in G:\www\ho.st\wp-includes
> \post-template.php on line 431
>
> Notice: Trying to get property of non-object in G:\www\ho.st\wp-
> includes\query.php on line 2600
>
> Notice: Trying to get property of non-object in G:\www\ho.st\wp-includes
> \post-template.php on line 1172
> class="page page-id- page-parent logged-in">
> }}}
>
> the problem is, that wp-activate.php attempts to simulate a normal
> WordPress page, the problem arrises that when the header is included
> and/or custom code in the theme runs on the header, that the no-existance
> of the current post id (NULL) causes most of the WordPress functions to
> complain, as they're expecting a correct post object to be returned.
>
> 2 options
>  1. Update all API function to move to {{{ if ( ! $_post = get_post(..) )
> return false; - This should probably be done anyway
>  2. Improve the hackery to allow displaying custom pages such as wp-
> activate.php more transparently.
>
> Furthur to #2, this might involve creating a page in the database which
> the API functions can access directly, the activate site page would then
> become a real page in the eyes of WordPress.

New description:

 wp-activate.php creates many notices on load due to theme hackery

 an example to start:
 {{{
 Notice: Trying to get property of non-object in G:\www\ho.st\wp-includes
 \comment-template.php on line 777

 Notice: Trying to get property of non-object in G:\www\ho.st\wp-includes
 \comment-template.php on line 794

 Notice: Trying to get property of non-object in G:\www\ho.st\wp-includes
 \general-template.php on line 1588

 Notice: Trying to get property of non-object in G:\www\ho.st\wp-
 includes\query.php on line 2600
 Notice: Trying to get property of non-object in G:\www\ho.st\wp-
 includes\query.php on line 2600

 Notice: Trying to get property of non-object in G:\www\ho.st\wp-includes
 \post-template.php on line 431

 Notice: Trying to get property of non-object in G:\www\ho.st\wp-
 includes\query.php on line 2600

 Notice: Trying to get property of non-object in G:\www\ho.st\wp-includes
 \post-template.php on line 1172
 class="page page-id- page-parent logged-in">
 }}}

 the problem is, that wp-activate.php attempts to simulate a normal
 WordPress page, the problem arrises that when the header is included
 and/or custom code in the theme runs on the header, that the no-existance
 of the current post id (NULL) causes most of the WordPress functions to
 complain, as they're expecting a correct post object to be returned.

 2 options
  1. Update all API function to move to {{{ if ( ! $_post = get_post(..) )
 return false; - This should probably be done anyway
  2. Improve the hackery to allow displaying custom pages such as wp-
 activate.php more transparently.

 Furthur to #2, this might involve creating a page in the database which
 the API functions can access directly, the activate site page would then
 become a real page in the eyes of WordPress.

--

Comment:

 Moving to the Multisite Component as this is more of a Multisite issue
 than a Warnings/Notice fixup.

 And also marking as an Enhancement.

 When we address this we should move away from as much theme hackery as
 possible.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12145#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list