• Resolved Seath

    (@seath)


    Hello I keep getting this error when I visit the statistics page.

    Fatal error: Uncaught TypeError: burst_statistics::convert_date_to_utc(): Return value must be of type int, string returned in /wp-content/plugins/burst-statistics/statistics/class-statistics.php:665
    
    Stack Trace
    1.	
    burst_statistics->convert_date_to_utc(' 00:00:00')
    /wp-content/plugins/burst-statistics/settings/settings.php:363
    2.	
    burst_get_data(Object(WP_REST_Request))
    /wp-includes/rest-api/class-wp-rest-server.php:1171
    3.	
    WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/burst/v1/data/...', Array, NULL)
    /wp-includes/rest-api/class-wp-rest-server.php:1018
    4.	
    WP_REST_Server->dispatch(Object(WP_REST_Request))
    /wp-includes/rest-api/class-wp-rest-server.php:442
    5.	
    WP_REST_Server->serve_request('/burst/v1/data/...')
    /wp-includes/rest-api.php:410
    6.	
    rest_api_loaded(Object(WP))
    /wp-includes/class-wp-hook.php:308
    7.	
    WP_Hook->apply_filters('', Array)
    /wp-includes/class-wp-hook.php:332
    8.	
    WP_Hook->do_action(Array)
    /wp-includes/plugin.php:565
    9.	
    do_action_ref_array('parse_request', Array)
    /wp-includes/class-wp.php:399
    10.	
    WP->parse_request('')
    /wp-includes/class-wp.php:780
    11.	
    WP->main('')
    /wp-includes/functions.php:1332
    12.	
    wp()
    /wp-blog-header.php:16
    13.	
    require('/home/niowaholt...')
    /index.php:17
    14.	
    {main}
    thrown in /wp-content/plugins/burst-statistics/statistics/class-statistics.php on line 665

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter Seath

    (@seath)

    @rogierlankhorst It is all ranges including custom range.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Ok, I have added more logs to this branch to be able to see what is going on. Can you try the latest, then pick for example the last 30 days range, and post the resulting logs here? It doesn’t seem likely it’s a caching issue, but the logs should confirm that, and I can then also see if there’s anything off with the dates etc.

    Thread Starter Seath

    (@seath)

    @rogierlankhorst Here it is…

     
    Jan 25, 12:58:46
    
    Array
    (
    [0] => stdClass Object
    (
    [hit_count] => 3
    [period] => 2023-01-24
    )
    [1] => stdClass Object
    (
    [hit_count] => 10
    [period] => 2023-01-25
    )
    )
    
    Mark as fixed | Ignore
     
    Jan 25, 12:58:46
    
    regenerated data:
    
     
    Jan 25, 12:58:46
    
    cached insights results
    [25-Jan-2023 18:58:46 UTC]
    
     
    Jan 25, 12:58:46
    
    SELECT COUNT(DISTINCT(uid)) as hit_count,
    DATE_FORMAT(CONVERT_TZ(FROM_UNIXTIME(time), '+00:00', '-06:00'), '%Y-%m-%d') as period
    FROM (SELECT * FROM burst_statistics WHERE session_id NOT IN (select session_id
    from burst_statistics
    WHERE time > 1674626400 AND time < 1674712799
    GROUP BY session_id
    having count(*) = 1
    and sum(time_on_page) < 5000) and time > 1674626400 AND time < 1674712799) as stats
    GROUP BY period order by period
    
     
    Jan 25, 12:58:46
    
    select SQL
    
     
    Jan 25, 12:58:46
    
    Array
    (
    [metric] => visitors
    [date_start] => 1674626400
    [date_end] => 1674712799
    [interval] => day
    [date_range] => custom
    )
    
     
    Jan 25, 12:58:46
    
    get insights data args
    
     
    Jan 25, 12:58:46
    
    Array
    (
    [date_start] => 1674626400
    [date_end] => 1674712799
    [date_range] => custom
    [metrics] => Array
    (
    [0] => visitors
    )
    [interval] => day
    )
    
     
    Jan 25, 12:58:46
    
    insights args
    
     
    Jan 25, 12:58:43
    
    Array
    (
    [0] => stdClass Object
    (
    [hit_count] => 3
    [period] => 2023-01-24
    )
    [1] => stdClass Object
    (
    [hit_count] => 10
    [period] => 2023-01-25
    )
    )
    
     
    Jan 25, 12:58:43
    
    regenerated data:
    
     
    Jan 25, 12:58:43
    
    cached insights results
    [25-Jan-2023 18:58:43 UTC]
    
     
    Jan 25, 12:58:43
    
    SELECT COUNT(DISTINCT(uid)) as hit_count,
    DATE_FORMAT(CONVERT_TZ(FROM_UNIXTIME(time), '+00:00', '-06:00'), '%Y-%m-%d') as period
    FROM (SELECT * FROM burst_statistics WHERE session_id NOT IN (select session_id
    from burst_statistics
    WHERE time > 1674626400 AND time < 1674712799
    GROUP BY session_id
    having count(*) = 1
    and sum(time_on_page) < 5000) and time > 1674626400 AND time < 1674712799) as stats
    GROUP BY period order by period
    
     
    Jan 25, 12:58:43
    
    select SQL
    
     
    Jan 25, 12:58:43
    
    Array
    (
    [metric] => visitors
    [date_start] => 1674626400
    [date_end] => 1674712799
    [interval] => day
    [date_range] => custom
    )
    
     
    Jan 25, 12:58:43
    
    get insights data args
    
     
    Jan 25, 12:58:43
    
    Array
    (
    [date_start] => 1674626400
    [date_end] => 1674712799
    [date_range] => custom
    [metrics] => Array
    (
    [0] => visitors
    )
    [interval] => day
    )
    
     
    Jan 25, 12:58:43
    
    insights args
    
     
    Jan 25, 12:58:41
    
    Array
    (
    [0] => stdClass Object
    (
    [hit_count] => 3
    [period] => 2023-01-24
    )
    [1] => stdClass Object
    (
    [hit_count] => 10
    [period] => 2023-01-25
    )
    )
    
     
    Jan 25, 12:58:41
    
    regenerated data:
    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    What I see in the logs is that a new query runs, but the output of this query on the database returns an empty dataset.
    I ran the same query on our own website, and get a valid array of hits back, so the query itself seems good.

    I see the selected range for the above is:
    from Wed Jan 25 2023 06:00:00 until Thu Jan 26 2023 05:59:59

    Does that match with your selection at that time?

    Is it possible that burst hits aren’t registering in the database at the moment? Can you share your domain so we can take a look at the track hit? You can also send your domain to support(at)burst-statistics.com if you don’t want to share it here.

    Thread Starter Seath

    (@seath)

    @rogierlankhorst The hits are being registered, I can see then in the windows next to the graph. They are just not showing up in the graph itself.

    It is weird because I have the same problem on my test site where are no hits at all.

    I tried bunch of selections including custom ones.

    I did emailed you my site “Support ticket 16410485”

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Fatal error: Uncaught TypeError’ is closed to new replies.