• Resolved deltafactory

    (@deltafactory)


    Hello,

    I am reporting multiple issues/errors in the plugin for your consideration/correction:

    1. Processing of the $extrafields parameter of wp_statistics_date_range_selector() uses esc_url() incorrectly. The function is intended to format complete URLs. In this context it is being used to sanitize URL parameters. esc_attr() or add_query_arg() might be the better choice here.

    Also, you might find it useful to use wp_parse_args() to handle input of $extrafields since that allows both URL-style and array key/value input. Just a suggestion…

    2. The pagination logic on the Top Pages report is incorrect, showing the “last” item per page as the first entry of subsequent pages. For example, #10 is the last on page 1 and first on page 2.

    I resolved this by removing the if/break at the end of the pagination loop and changing the if statement before the log-item output to:

    if( $count > $start && $count <= $start + 10 ) {

    3. When selecting a manual date range (only tested on Top Pages code), the Range start/end dates are modified so that they are 1 day earlier. I haven’t looked for the exact cause or resolution.

The topic ‘3 errors on report pages’ is closed to new replies.