Okay
  Public Ticket #2687926
Charts not loading
Closed

Comments

  • Jeff started the conversation

    I display WPTables and WPCharts on my real estate website.  I am using 1 table and 8 charts on each of 12 "Area" pages.  I update the data each month by using a google sheet for the source information.  Yesterday I downloaded the newest version of your plugin and now none of the charts will display. Although I did get the table on each page to display.  I can't see anything wrong with the data source as each chart shows up in the chart setup area.

  • [deleted] replied

    Hello Jeff

    Thank you for your purchase, and sorry for the inconvenience.

    We have a bug with wpDataCharts when "Follow table filtering" is enabled.

    Please go to wp-content/plugins/wpdatatables/source/class.wpdatachart.php and on line 2706 you will find this:

     if ($this->getFollowFiltering()) {

    Add this code at the end of that statement:

    if (get_option('wdtIncludeBootstrap') == 1) {
                    wp_enqueue_script('wdt-bootstrap', WDT_JS_PATH . 'bootstrap/bootstrap.min.js', array('jquery', 'wdt-bootstrap-select'), WDT_CURRENT_VERSION, true);
                } else {
                    wp_enqueue_script('wdt-bootstrap', WDT_JS_PATH . 'bootstrap/noconf.bootstrap.min.js', array('jquery', 'wdt-bootstrap-select'), WDT_CURRENT_VERSION, true);
                }
                wp_enqueue_script('wdt-bootstrap-select', WDT_JS_PATH . 'bootstrap/bootstrap-select/bootstrap-select.min.js', array(), WDT_CURRENT_VERSION, true);            wp_localize_script('wdt-wpdatatables', 'wpdatatables_settings', WDTTools::getDateTimeSettings());
                wp_localize_script('wdt-wpdatatables', 'wpdatatables_frontend_strings', WDTTools::getTranslationStrings());

    So your code looks like this:

    if ($this->getFollowFiltering()) {
                wp_enqueue_script('wdt-common', WDT_ROOT_URL . 'assets/js/wpdatatables/admin/common.js', array('jquery'), WDT_CURRENT_VERSION, true);
                if ($minified_js) {
                    wp_enqueue_script('wdt-wpdatatables', WDT_JS_PATH . 'wpdatatables/wdt.frontend.min.js', array('wdt-common'), WDT_CURRENT_VERSION, true);
                    wp_localize_script('wdt-wpdatatables', 'wdt_ajax_object', array('ajaxurl' => admin_url('admin-ajax.php')));
                } else {
                    wp_enqueue_script('wdt-datatables', WDT_JS_PATH . 'jquery-datatables/jquery.dataTables.min.js', array(), WDT_CURRENT_VERSION, true);
                    wp_enqueue_script('wdt-funcs-js', WDT_JS_PATH . 'wpdatatables/wdt.funcs.js', array('jquery', 'wdt-datatables', 'wdt-common'), WDT_CURRENT_VERSION, true);
                    wp_enqueue_script('wdt-wpdatatables', WDT_JS_PATH . 'wpdatatables/wpdatatables.js', array('jquery', 'wdt-datatables'), WDT_CURRENT_VERSION, true);
                }
                if (get_option('wdtIncludeBootstrap') == 1) {
                    wp_enqueue_script('wdt-bootstrap', WDT_JS_PATH . 'bootstrap/bootstrap.min.js', array('jquery', 'wdt-bootstrap-select'), WDT_CURRENT_VERSION, true);
                } else {
                    wp_enqueue_script('wdt-bootstrap', WDT_JS_PATH . 'bootstrap/noconf.bootstrap.min.js', array('jquery', 'wdt-bootstrap-select'), WDT_CURRENT_VERSION, true);
                }
                wp_enqueue_script('wdt-bootstrap-select', WDT_JS_PATH . 'bootstrap/bootstrap-select/bootstrap-select.min.js', array(), WDT_CURRENT_VERSION, true);
                wp_localize_script('wdt-wpdatatables', 'wpdatatables_settings', WDTTools::getDateTimeSettings());
                wp_localize_script('wdt-wpdatatables', 'wpdatatables_frontend_strings', WDTTools::getTranslationStrings());
            }
    

    After you do this, purge cache from your website and browser, and test again.

    Please let me know if this helps.

  • Jeff replied

    Hi Blaženka,

    I copied the code as you provided, cleared the cache both on the website and in my browser.  Still nothing.  I then created a new chart based on the same source as before and added it to one of my pages and the chart displays properly in the admin section.  This is a step in the right direction.  Although when I go to a new public browser these charts fail to display at all.  https://coastandcanyons.com/market-watch-agoura-hills/

    Any ideas why the charts would work in the admin area but not on a public display?  Thanks for your help!

    Jeff

  • Jeff replied

    Here's how it shows up on the admin side... (with the chart displaying).  But if you go to the link below you will see that it does not display.

  • [deleted] replied

    Hi Jeff

    Thank you for your email.

    wpDataTables is a WYSIWYG (What You See Is What You Get) concept based plugin. This means that the chart should look the same both in back-end and in front-end. If your front-end chart looks and behaves differently than in back-end, this usually implies that there is another plugin (or the current theme) that's interfering with our plugin. 

    Can you please change the theme and see if the issue is resolved? If not, then please deactivate all other plugins except for our plugin, refresh the page where the issue is, and see if it is resolved (it should be). If it is, then start activating other plugins one by one, and after each activation refresh the page to see if the issue reoccurred. Once it does reoccur, you will have found the plugin causing the issue. 

    Please do let me know if the issue is still there, I will be investigating this further in the meantime.


  • Jeff replied

    Blaženka,

    I've tried both options and neither will bring back the charts.  I switched to 2 different themes and still none of the charts would load.  The tables still work.  Then I turned off all plugins except for wpDataTables.  Still nothing happened.  Can you please let me know how to revert back to a previous version of the software.  I really don't want to be playing around with this any longer.  Thanks.

  • [deleted] replied

    Hi Jeff

    Please try replacing the files in these two locations:

    wp-content/plugins/wpdatatables/assets/js/wpdatatables/wdt.chartsRender.js

    wp-content/plugins/wpdatatables/assets/js/wpdatatables/wdt.chartsRender.min.js

    With the files attached to my response. When you replace them, delete cache from your website and browser, and test again. It should work after that.

    I have attached our previous version as well but I would highly suggest trying the above solution first.

    Do let me know if this helps.

  • Jeff replied

    Hello Blaženka,

    Well, after replacing the 2 files you sent to me the charts are back in order again.  Thank you very much for your assistance!

    Sincerely,

    Jeff

  • [deleted] replied

    You are most welcomesmile.png

    I am happy to hear the issue is resolved. Please don't hesitate to contact us if there is anything else we can assist you with, we are always happy to helpsmile.png

    Have a wonderful day!