Okay
  Public Ticket #1695830
Column Data AVERAGE shortcode
Closed

Comments

  • Matthewisawsam14 started the conversation

    I am using the shortcode for a column AVERAGE. When users first come to the page, before they have used the service and populated the data, the shortcode for AVG displays the attached divide by zero error code. How do I avoid showing this to the user on the front end before column data is populated?

    Also, the AVG shortcode displays the average with two decimal places. I cannot change it even by changing the default settings to 0 decimal places. Is it possible to show only an integer?



  •  471
    Isidora replied

    Hi Matthewisawsam14,
    Thank you for your purchase.

    Most of the time these are nothing to worry about (this will be forward to my team to investigate and fix for nex major release). PHP warnings and notices are nothing to worry about on a production site most of the time. Some of these can even be generated because the developer has to keep compatibility with older versions of WordPress as well as older PHP versions.

    The solution:

     In your wp-config.php I suppose that you will find this:

    define('WP_DEBUG', true);

    and replace with this so all errors,notices will not be shown but will be written in log file:

    ini_set('display_errors','Off');
    ini_set('error_reporting', E_ALL );
    define('WP_DEBUG', true);
    define( 'WP_DEBUG_LOG', true );
    define('WP_DEBUG_DISPLAY', false);

    Unfortunately that is not possible with built in features of plugin.

    Best regards.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables