Admin Panel WPP-Stats don’t work
-
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.
-
Hi there!
Try this:
- Log in into your dashboard.
- Go to Settings > WordPress Popular Posts.
- Do a “hard-refresh” (ctrl+F5) to have the broswer update its cache.
- 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?
I try that. Also I’ve done empty broser data. I use Chrome and IE11.
WordPress 4.8.2Plugins 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
Thanks!
Alright, please try this:
- Visit your admin dashboard using Google Chrome.
- Hit ctrl+shift+i to open Google Chrome’s developer tools, and click on the Console tab.
- Go to Settings > WordPress Popular Posts and take a screen capture.
- Click on all of the time ranges once (and take a screenshot every time).
- Upload the screenshots somewhere (eg. https://prnt.sc/) and share the links here so I can have a look.
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/goidkaThank 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:
- 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.
- Go to Settings > WordPress Popular Posts and take a screen capture.
- Share the screen capture here.
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:
- Please disable all of your plugins, except for WPP.
- Do a “hard-refresh” (ctrl+F5) to have the broswer update its cache.
- Check WPP’s Stats section again and interact with the chart again.
- Report back your findings.
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.
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.
Thank you. I’ll be glad to help.
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:
- Go to Plugins > Editor and select WCP OpenWeather from the dropdown.
- Click on
wcp-openweather/classes/RPw.class.php
to edit this file. - 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); } }
- Hit the Update file button to save changes.
- 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.
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.
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.
There was a problem. After making changes to the ‘WCP OpenWeather’ stopped working editing records. For a while, I disabled the ‘WCP OpenWeather’.
What do you mean with “stopped working editing records”? You can’t change its settings?
- The topic ‘Admin Panel WPP-Stats don’t work’ is closed to new replies.