Jetpack Post Views
[resolved] Custom Post Types views bug (3 posts)

  1. Jonathan Dingman
    Posted 2 years ago #

    Found a small bug with custom post types and the pending status of them.

    When a custom post type is not yet published, it throws this error:

    Warning: number_format() expects parameter 1 to be double, string given in /home/user/public_html/wp-includes/functions.php on line 155

    This is likely because it's trying to query a post that is not yet public and therefor, no stats are available.

    Also, probably worth adding an option to decide which post types to query, having it for every CPT is likely making the page load slower when I don't actually want that data being retrieved or tracked.


  2. Steven Lambert
    Plugin Author

    Posted 2 years ago #

    Thanks for letting me know, I'll get it fixed in the next patch. I'll also set an option for displaying the view stats on the All Posts page so you can enable or disable it if you want to.

  3. Steven Lambert
    Plugin Author

    Posted 2 years ago #

    Fixed in version 1.0.9 (also added option in Settings page to disable the Total View column)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack Post Views
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic