• Resolved etyper

    (@etyper)


    I’ve upgraded to the latest version of the plugin (from 3.4). In Stats Panel I can see only ‘7d’ stats. ’24h’, ’30d’, ‘Custom’ don’t work. When I click them nothing happens. What could it be? Other links ‘Most commented’, ‘Tranding now’, ‘Hall of Fame’ don’t work too. ‘Tools’ and ‘Parameters’ work ok.
    In ‘Tools’ I’ve enabled caching with 1 hour refresh. But widget refreshing in real time so if caching were turned off.

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi there!

    Try this:

    1. Log in into your dashboard.
    2. Go to Settings > WordPress Popular Posts.
    3. Do a “hard-refresh” (ctrl+F5) to have the broswer update its cache.
    4. Try again.

    If it still doesn’t work after that:

    • What browser are you using?
    • WordPress version?
    • What plugins are you using?
    • What’s your site’s URL?
    Thread Starter etyper

    (@etyper)

    I try that. Also I’ve done empty broser data. I use Chrome and IE11.
    WordPress 4.8.2

    Plugins that I use: Akismet Anti-Spam, All In One SEO Pack, Comments Widget Plus, Custom Posts Per Page, Cyr to Lat enhanced, Duplicator, Easy Table, EWWW Image Optimizer, Image Watermark, Lockdown WP Admin, NextScripts: Social Networks Auto-Poster, P3 (Plugin Performance Profiler), Simple Events Calendar, Simply Exclude, Smooth Scroll Up, TinyMCE Custom Styles, Use-your-Drive, User Role Editor, WCP OpenWeather, WordPress Popular Posts, WP Database Backup, WP-PageNavi, Yandex.News Feed by Teplitsa, YouTube.

    My site: https://denzadnem.com.ua

    Plugin Author Hector Cabrera

    (@hcabrera)

    Thanks!

    Alright, please try this:

    1. Visit your admin dashboard using Google Chrome.
    2. Hit ctrl+shift+i to open Google Chrome’s developer tools, and click on the Console tab.
    3. Go to Settings > WordPress Popular Posts and take a screen capture.
    4. Click on all of the time ranges once (and take a screenshot every time).
    5. Upload the screenshots somewhere (eg. https://prnt.sc/) and share the links here so I can have a look.
    Thread Starter etyper

    (@etyper)

    There are screenshots:

    > Go to Settings > WordPress Popular Posts and take a screen capture.
    https://prntscr.com/goiad6

    > Click on all of the time ranges once (and take a screenshot every time).
    https://prntscr.com/goiccr
    https://prntscr.com/goicpj
    https://prntscr.com/goid9b
    https://prntscr.com/goidf2
    https://prntscr.com/goidka

    Plugin Author Hector Cabrera

    (@hcabrera)

    Thank you!

    Alright, you have a bunch of Javascript errors there. Usually this either means that a Javascript library failed to load for some reason, or another script is causing a conflict.

    So, please:

    1. Hit ctrl+shift+i to open Google Chrome’s developer tools again, click on the Network tab and then click on “JS” (scripts) so we can see if there are any scripts failing to load.
    2. Go to Settings > WordPress Popular Posts and take a screen capture.
    3. Share the screen capture here.
    Thread Starter etyper

    (@etyper)

    Plugin Author Hector Cabrera

    (@hcabrera)

    Thanks!

    From your screenshots it seems that all of the scripts loaded correctly, which then means that one of them is likely the cause of the problem.

    Alright, next:

    1. Please disable all of your plugins, except for WPP.
    2. Do a “hard-refresh” (ctrl+F5) to have the broswer update its cache.
    3. Check WPP’s Stats section again and interact with the chart again.
    4. Report back your findings.
    Thread Starter etyper

    (@etyper)

    Yes, it was a problem with one of plugin.
    I disabled all the plugins, and WPP worked fine. Then I enabled plugins one by one and found conflicting plugin. It was ‘WCP OpenWeather’. Thank you.

    What do you advise? Can this problem be fixed or is it better to immediately look for a replacement for ‘WCP OpenWeather’? WPP is more important for me.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Good, we’re getting somewhere now ??

    I’ll have a look at WCP OpenWeather to try to understand why it breaks WPP’s Stats section. If possible, I’d like to add a workaround to prevent it (and possibly other plugins) from messing around with WPP. If that’s not technically possible, I’ll ask the author of the WCP OpenWeather to make specific changes so their scripts so these don’t conflict with others.

    I might need your help again, if so I’ll let you know. Hope that’s OK.

    Thread Starter etyper

    (@etyper)

    Thank you. I’ll be glad to help.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Just installed the WCP OpenWeather and there were no conflicts, the WPP Stats section is still working normally for me. How odd. Are you sure this is the one causing the conflict?

    I did find, however, that the WCP OpenWeather plugin loads its scripts and stylesheets on every admin section instead of just on their own admin page – which is not a good practice.

    Try this:

    1. Go to Plugins > Editor and select WCP OpenWeather from the dropdown.
    2. Click on wcp-openweather/classes/RPw.class.php to edit this file.
    3. Find:
      public function enqueueAdminScripts () {
          wp_enqueue_style( 'wp-color-picker' );        
          wp_enqueue_script( 'wp-color-picker' );          
          wp_enqueue_script('colorbox-js', $this->getAssetUrl() . '/libs/colorbox/jquery.colorbox-min.js',array('jquery'));
          wp_enqueue_style('colorbox-css', $this->getAssetUrl() . '/libs/colorbox/colorbox.css');        
      
          $pluginSettings = $this->settings->getPluginSettings();        
          wp_enqueue_script( 'rpw-gm-lib', $this->getAssetUrl('js/googlemap.js'), array('jquery') );                                                                 
          wp_localize_script( 'rpw-gm-lib', 'rpw_gapi', array( 
              'enabledGoogleMapsApi' => !empty($pluginSettings['enableGoogleMapsApi']),
              'existsGoogleApiKey' => (boolean) $this->getGoogleApiKey(),
              'emptyGoogleApiKeyMessage' => $this->getEmptyGoogleApiKeyMessage(),
          ));  
          
          if ( !empty($pluginSettings['enableGoogleMapsApi']) && $this->getGoogleApiKey() ) {
              wp_enqueue_script( 'rpw-gm', 'https://maps.googleapis.com/maps/api/js?libraries=places&v=3&language=' . $this->getPluginLang() . '&callback=initMap&key='.$this->getGoogleApiKey(), array('rpw-gm-lib') );            
              wp_enqueue_script( 'rpw', $this->getAssetUrl('js/admin.js'), array('jquery', 'rpw-gm', 'rpw-gm-lib', 'wp-color-picker', 'colorbox-js') );
          } else {
              wp_enqueue_script( 'rpw', $this->getAssetUrl('js/admin.js'), array('jquery', 'wp-color-picker', 'colorbox-js') );                                                             
          }       
          
          wp_enqueue_style( 'rpw-css', $this->getAssetUrl('css/admin.css'));  
          
          wp_localize_script( 'rpw', 'ajax_rpw', array( 
              'base_url' => site_url(),         
              'ajax_url' => admin_url( 'admin-ajax.php' ), 
              'ajax_nonce' => wp_create_nonce('ajax_atf_nonce'),  
              'tinyMCEButtonTitle' => __('Add new WCP OpenWeather shortcode', 'wcp-openweather'),
          ));  
          
          wp_enqueue_script('rpw-gm-customize', $this->getAssetUrl('js/customize.js'), array( 'jquery','rpw' ), '', true);
      }
      
      

      and replace it with:

      public function enqueueAdminScripts () {
      
          $screen = get_current_screen();
      
          // Let's load these scripts and stylesheets on WCP OpenWeather's admin screens only
          if ( 'wcp-weather_page_wcp-weather' == $screen->id ) {
      
              wp_enqueue_style( 'wp-color-picker' );
              wp_enqueue_script( 'wp-color-picker' );
              wp_enqueue_script('colorbox-js', $this->getAssetUrl() . '/libs/colorbox/jquery.colorbox-min.js',array('jquery'));
              wp_enqueue_style('colorbox-css', $this->getAssetUrl() . '/libs/colorbox/colorbox.css');
      
              $pluginSettings = $this->settings->getPluginSettings();
              wp_enqueue_script( 'rpw-gm-lib', $this->getAssetUrl('js/googlemap.js'), array('jquery') );
              wp_localize_script( 'rpw-gm-lib', 'rpw_gapi', array(
                  'enabledGoogleMapsApi' => !empty($pluginSettings['enableGoogleMapsApi']),
                  'existsGoogleApiKey' => (boolean) $this->getGoogleApiKey(),
                  'emptyGoogleApiKeyMessage' => $this->getEmptyGoogleApiKeyMessage(),
              ));
      
              if ( !empty($pluginSettings['enableGoogleMapsApi']) && $this->getGoogleApiKey() ) {
                  wp_enqueue_script( 'rpw-gm', 'https://maps.googleapis.com/maps/api/js?libraries=places&v=3&language=' . $this->getPluginLang() . '&callback=initMap&key='.$this->getGoogleApiKey(), array('rpw-gm-lib') );
                  wp_enqueue_script( 'rpw', $this->getAssetUrl('js/admin.js'), array('jquery', 'rpw-gm', 'rpw-gm-lib', 'wp-color-picker', 'colorbox-js') );
              } else {
                  wp_enqueue_script( 'rpw', $this->getAssetUrl('js/admin.js'), array('jquery', 'wp-color-picker', 'colorbox-js') );
              }
      
              wp_enqueue_style( 'rpw-css', $this->getAssetUrl('css/admin.css'));
      
              wp_localize_script( 'rpw', 'ajax_rpw', array(
                  'base_url' => site_url(),
                  'ajax_url' => admin_url( 'admin-ajax.php' ),
                  'ajax_nonce' => wp_create_nonce('ajax_atf_nonce'),
                  'tinyMCEButtonTitle' => __('Add new WCP OpenWeather shortcode', 'wcp-openweather'),
              ));
      
              wp_enqueue_script('rpw-gm-customize', $this->getAssetUrl('js/customize.js'), array( 'jquery','rpw' ), '', true);
      
          }
      
      }
    4. Hit the Update file button to save changes.
    5. Enable the WCP OpenWeather plugin (if it was disabled), do a “hard-refresh” to update your browser’s cache and visit WPP’s Settings page again to check if the problem persists.

    Please let me know how it goes.

    Thread Starter etyper

    (@etyper)

    I did it. But first I reinstalled the ‘WCP OpenWeather’. The ‘WPP’ didn’t work. Then I made the proposed changes. And it worked. The ‘WPP’ worked as it should. I hope this information was helpful.

    Plugin Author Hector Cabrera

    (@hcabrera)

    That’s odd, but I’m glad to know things are working now ??

    I’ll get in touch with the developer of the WCP OpenWeather plugin and ask him to include this change on their next update.

    Thread Starter etyper

    (@etyper)

    There was a problem. After making changes to the ‘WCP OpenWeather’ stopped working editing records. For a while, I disabled the ‘WCP OpenWeather’.

    Plugin Author Hector Cabrera

    (@hcabrera)

    What do you mean with “stopped working editing records”? You can’t change its settings?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Admin Panel WPP-Stats don’t work’ is closed to new replies.