• Resolved webwitnl

    (@webwitnl)


    Hi, I found the following error various times in my php error log.

    I cursory looked at it, wp_parse_url() is defined by wp-includes/http.php, which in turn is included by wp-settings.php, so my guess is this endpoint is light and basic and doesn’t include http.php.

    [06-Feb-2024 10:39:21 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function wp_parse_url() in /home/wildewolf/public_html/wp-includes/formatting.php:4527

    Stack trace:

    #0 /home/wildewolf/public_html/wp-includes/formatting.php(4620): esc_url(‘https://www.wil…’, NULL, ‘db’)

    #1 /home/wildewolf/public_html/wp-includes/formatting.php(4602): sanitize_url(‘https://www.wil…’, NULL)

    #2 /home/wildewolf/public_html/wp-content/plugins/burst-statistics/tracking/tracking.php(244): esc_url_raw(‘https://www.wil…’)

    #3 /home/wildewolf/public_html/wp-content/plugins/burst-statistics/tracking/tracking.php(56): burst_sanitize_entire_page_url(‘https://www.wil…’)

    #4 /home/wildewolf/public_html/wp-content/plugins/burst-statistics/tracking/tracking.php(195): burst_track_hit(Array)

    #5 /home/wildewolf/public_html/wp-content/plugins/burst-statistics/endpoint.php(20): burst_beacon_track_hit()

    #6 {main}

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Hessel de Jong

    (@hesseldejong)

    Hi @webwitnl,

    Thanks for notifying us of this error. I have not seen it before, I will do some tests and get back to you.

    Plugin Author Hessel de Jong

    (@hesseldejong)

    Hi @webwit,

    Which version are you on? We do not use wp_parse_url anywhere in the latest release.

    We do use parse_url, in the endpoint because we use WP short init, for faster requests.

    Kind regards,
    Hessel

    Thread Starter webwitnl

    (@webwitnl)

    Latest versions of everything.

    Note that parse_url is not called by burst but by wp-includes/formatting.php.

    See the trace #2, /wp-content/plugins/burst-statistics/tracking/tracking.php calls esc_url_raw.

    Thread Starter webwitnl

    (@webwitnl)

    So I took a look myself, wp_parse_url is called by esc_url in formatting.php when the url contains a [ or ]. I logged the url when this is the case.

    So if you go here:
    https://www.wildewolf.nl/product-categorie/gezonde-hondensnacks/gedroogde-hondensnacks/
    And then select a filter on the left, you get such urls.

    • This reply was modified 1 year, 4 months ago by webwitnl.
    Plugin Author Hessel de Jong

    (@hesseldejong)

    Thanks a lot for figuring this out. I would’ve never figured that out by debugging, so much appreciated 🙂

    I will look into a fix in the upcoming week. I will let you know, when the issue has been fixed and when it will be released.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    @webwitnl apparently this function is not loaded when such a character is in the url, but it is loaded without it. Very strange.

    I have created a fix for this:
    https://github.com/Burst-Statistics/burst/tree/fix-missing-wp_parse_url

    You can deactivate your current plugin, then download, and install the plugin from this branch.

    This should resolve your issue. Let me know if this helps!

    Thread Starter webwitnl

    (@webwitnl)

    Sorry for the late reply, seems to work well! Thanks for the fix.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error: Call to undefined function wp_parse_url()’ is closed to new replies.