Title: JetPack causing error &#8211; post-template.php line 284
Last modified: February 15, 2018

---

# JetPack causing error – post-template.php line 284

 *  Resolved [FireFlyWebs](https://wordpress.org/support/users/fireflywebs/)
 * (@fireflywebs)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/jetpack-causing-error-post-template-php-line-284/)
 * When I add a new page I get this error at the top:
    Warning: count(): Parameter
   must be an array or an object that implements Countable in (I took this part 
   of the address out)\backyardpollinator.com\wp-includes\post-template.php on line
   284
 * It doesn’t matter what theme I have installed.
    I do have woocommerce installed,
   and this error even happens with their default welcome page. This site is a store
   site and only has one page (the one I’m trying to create) other than the woocommerce
   default pages for which the error doesn’t happen.
 * {All other pages from the menu go back to the sister site on the .ca domain….
   this one is on the .com domain.}
 * Those lines on 284 of the post-template.php are
    if ( $page > count( $pages ))//
   if the requested page doesn’t exist $page = count( $pages ); // give them the
   highest numbered page that DOES exist
 * I sequentially turned off plugins and found that it is Jet pack that is causing
   the problem, so I’ve had to disable it. So with it disabled the error is not 
   showing.
    Can someone help with this. I can re-enable Jet pack so you can see
   the error on the product page if you like.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjetpack-causing-error-post-template-php-line-284%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [FireFlyWebs](https://wordpress.org/support/users/fireflywebs/)
 * (@fireflywebs)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/jetpack-causing-error-post-template-php-line-284/#post-9979997)
 * Error is also showing up on the cart, acct and check out pages. I removed the
   product page since my post above, but this error is a major bug on my site.
    
   [https://backyardpollinator.com/cart/](https://backyardpollinator.com/cart/)
 *  [pmciano](https://wordpress.org/support/users/pmciano/)
 * (@pmciano)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/jetpack-causing-error-post-template-php-line-284/#post-9985090)
 * This is a known problem that is being worked on:
 * [https://github.com/Automattic/jetpack/issues/8420](https://github.com/Automattic/jetpack/issues/8420)
 * If you’d like updates on this, please follow this issue, as that is where the
   problem will be addressed:
 * [https://github.com/Automattic/jetpack/pull/8510](https://github.com/Automattic/jetpack/pull/8510)
 * Thank you for your patience.
 *  Thread Starter [FireFlyWebs](https://wordpress.org/support/users/fireflywebs/)
 * (@fireflywebs)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/jetpack-causing-error-post-template-php-line-284/#post-9996121)
 * I don’t understand all the discussion, but is progress being made. We can’t go
   live with our store until this error message is not showing on the top of the
   page.
 * If I down grade the php from 7.2 to 5.6 …. will this help?
 *  [pmciano](https://wordpress.org/support/users/pmciano/)
 * (@pmciano)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/jetpack-causing-error-post-template-php-line-284/#post-10006195)
 * It seems like it should be addressed soon, but if you need to get things going
   now, rolling back to PHP `7.1` may be sufficient:
 * [https://github.com/Automattic/jetpack/issues/8420#issuecomment-353972534](https://github.com/Automattic/jetpack/issues/8420#issuecomment-353972534)
 * We hope that helps and let us know if you have any more questions.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘JetPack causing error – post-template.php line 284’ is closed to new 
replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [pmciano](https://wordpress.org/support/users/pmciano/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/jetpack-causing-error-post-template-php-line-284/#post-10006195)
 * Status: resolved