#188 new
Tim Beck

wp2.7 conflict with Wordpress Stats plugin

Reported by Tim Beck | December 31st, 2008 @ 09:33 PM

Possibly related to #155, the wpo option page content somehow overwrites the Wordpress Stats option page on the WP dashboard. Not only does the content not fit in the div, but it more importantly overwrites the Wordpress stats content. See attached png.

Comments and changes to this ticket

  • Tim Beck

    Tim Beck January 9th, 2009 @ 02:41 PM

    I'm pretty sure this is going to impact any dashboard subpanel that is loaded via ajax with a 'page' parameter. The reason is that the wpomatic init() method is run every time Wordpress is initialized. In that function you see

      if(isset($_REQUEST['page']))
      {                                                                         
        if(isset($_REQUEST['campaign_add']) || isset($_REQUEST['campaign_edit']\
    
    

    ))

          $this->adminCampaignRequest();
    
        $this->adminExportProcess();                                            
        $this->adminInit();                                                     
      }  
    
    

    Since the url that loads the Wordpress Stats subpanel is /wp-admin/index.php?page=stats&noheader&width=842, page is set and therefore adminInit is going to be called.

    In adminInit you see this at the end of the function:

    if(WPOTools::isAjax())

    {
      $this->admin();                                                           
      exit;                                                                     
    }     
    
    

    I'm guessing this means that if the request is ajax, the admin function will be called which outputs the main wpomatic admin page.

    So it looks to me like any ajax request with page in the url will return the wpomatic admin page content.

  • Tim Beck

    Tim Beck January 9th, 2009 @ 02:41 PM

    Sorry about the weird code formatting above.

  • Tim Beck

    Tim Beck January 9th, 2009 @ 10:28 PM

    In the init() function, if you test that the page parameter is the same as the file we are in, then the stuff inside the if doesn't get executed unless we are on the wpomatic.php page.

    Here's the diff.

    --- wpomatic.php.org 2009-01-09 16:54:30.000000000 -0600 +++ wpomatic.php 2009-01-09 16:55:56.000000000 -0600 @@ -350,7 +350,7 @@

       if(! get_option('wpo_unixcron'))
         $this->processAll();   
    
    
    • if(isset($_REQUEST['page']))
    • if($_REQUEST['page'] == basename(FILE)) {
       if(isset($_REQUEST['campaign_add']) || isset($_REQUEST['campaign_edit']))
         $this->adminCampaignRequest();
      
      
      @@ -2073,4 +2073,4 @@ } }
  • Tim Beck

    Tim Beck January 9th, 2009 @ 10:28 PM

    --- wpomatic.php.org    2009-01-09 16:54:30.000000000 -0600
    +++ wpomatic.php    2009-01-09 16:55:56.000000000 -0600
    @@ -350,7 +350,7 @@
           if(! get_option('wpo_unixcron'))
             $this->processAll();   
     
    -      if(isset($_REQUEST['page']))
    +      if($_REQUEST['page'] == basename(__FILE__))
           {
             if(isset($_REQUEST['campaign_add']) || isset($_REQUEST['campaign_edit']))
               $this->adminCampaignRequest();
    @@ -2073,4 +2073,4 @@
       }
     }        
     
    
    
  • Guillermo Rauch

    Guillermo Rauch January 10th, 2009 @ 12:22 AM

    The best way, which was done for the upcoming version: if(isset($REQUEST['page']) && $REQUEST['page'] == 'wpomatic.php')

    (avoids the notice when page is not set)

    Thanks!

  • Ricardo Rauch

    Ricardo Rauch April 15th, 2010 @ 08:50 AM

    • Assigned user changed from “Guillermo Rauch” to “Ricardo Rauch”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

WP-o-Matic project.

People watching this ticket

Attachments

Tags

Referenced by

Pages