[wp-trac] Re: [WordPress Trac] #7589: Fatal error: Call to a member function get_page_permastruct() on a non-object in /home/omry/dev/php/wp/2.6/wp-includes/link-template.php on line 152

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 5 00:59:04 GMT 2008


#7589: Fatal error: Call to a member function get_page_permastruct() on a non-
object in /home/omry/dev/php/wp/2.6/wp-includes/link-template.php on line
152
-------------------------------+--------------------------------------------
 Reporter:  omry               |        Owner:  anonymous
     Type:  defect             |       Status:  new      
 Priority:  normal             |    Milestone:  2.7      
Component:  General            |      Version:  2.6      
 Severity:  normal             |   Resolution:           
 Keywords:  reporter-feedback  |  
-------------------------------+--------------------------------------------
Comment (by DD32):

 And i have to say running code as soon as the plugin is included is a bad
 choice, WordPress hasnt fully initialised at that point, Theres a fair bit
 of setup which is required after the plugins are included, And if you
 require access to Permalinks, You'll need to have your code run when the
 permalink code initialisation has been done.

 I'm not going to test it straight away, but is there any reason why you
 cant use this?
 {{{
 add_action('init', 'fs_update_post_titles_post');
 add_action('init', 'fs_update_post_titles_page');

 function fs_update_post_titles_post(){ fs_update_post_titles("post") };
 function fs_update_post_titles_page(){ fs_update_post_titles("page") };
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7589#comment:14>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list