Products on category page sometimes ends in an odd amount
-
Hi Guys,
Products on category page sometimes ends in an odd amount.
For example I’ve tried setting the number of products per page to 24, and on page 3 of pagination it leaves a gap for the last product.The products not missing, just pushed back a page.
If I change the number to 20 and so on it just moves the issue a page or 2.
I’ve tried setting it in divi and also in the functions. Same issue.
Turned off all plugins and even changed themes. No luck.
-
Does the issue persist when you switch the theme to Storefront?
Correct, if I change themes the issue remains.
Hi @pagalo!
This is indeed strange behavior.
To know more about your setup and to further check into this, kindly provide us the following:
- Your System Status: You can find it via
WooCommerce > Status
. Select ‘Get system report’ and then ‘Copy for support’. Once you do this, paste in here your response. - Fatal Error Log: Share a copy of any fatal error log found under
WooCommerce > System Status > Logs
(if available).
Thanks!
Sure
### WordPress Environment ###WordPress address (URL): https://sansai.com.au
Site address (URL): https://sansai.com.au
WC Version: 6.2.0
REST API Version: ? 6.2.0
WC Blocks Version: ? 6.7.3
Action Scheduler Version: ? 3.4.0
WC Admin Version: ? 3.1.0
Log Directory Writable: ?
WP Version: ? 5.8.3 – There is a newer version of WordPress available (5.9)
WP Multisite: –
WP Memory Limit: 2 GB
WP Debug Mode: –
WP Cron: ?
Language: en_US
External object cache: –### Server Environment ###
Server Info: Apache
PHP Version: 7.3.33
PHP Post Max Size: 25 MB
PHP Time Limit: 1200
PHP Max Input Vars: 1200
cURL Version: 7.81.0
OpenSSL/1.1.1mSUHOSIN Installed: –
MySQL Version: 5.7.37
Max Upload Size: 25 MB
Default Timezone is UTC: ?
fsockopen/cURL: ?
SoapClient: ?
DOMDocument: ?
GZip: ?
Multibyte String: ?
Remote Post: ?
Remote Get: ?### Database ###
WC Database Version: 3.9.2
WC Database Prefix: wp_
Total Database Size: 101.71MB
Database Data Size: 66.44MB
Database Index Size: 35.27MB
wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 1.52MB + Index: 0.38MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 10.52MB + Index: 9.03MB + Engine InnoDB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
cerber_acl: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
cerber_blocks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
cerber_countries: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
cerber_lab: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
cerber_lab_ip: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
cerber_lab_net: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
cerber_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
cerber_qmem: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
cerber_traffic: Data: 0.04MB + Index: 0.00MB + Engine MyISAM
QWG3wSxJL_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_actionscheduler_actions: Data: 0.39MB + Index: 0.14MB + Engine MyISAM
wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_actionscheduler_logs: Data: 0.21MB + Index: 0.15MB + Engine MyISAM
wp_aws_cache: Data: 6.48MB + Index: 0.00MB + Engine MyISAM
wp_aws_index: Data: 1.63MB + Index: 0.84MB + Engine MyISAM
wp_cerber_files: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_cerber_sets: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_cerber_uss: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.50MB + Index: 0.28MB + Engine InnoDB
wp_defender_lockout: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_defender_lockout_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_ewwwio_images: Data: 2.52MB + Index: 2.83MB + Engine InnoDB
wp_ewwwio_queue: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_failed_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_options: Data: 2.19MB + Index: 0.20MB + Engine InnoDB
wp_postmeta: Data: 8.52MB + Index: 7.03MB + Engine InnoDB
wp_posts: Data: 14.52MB + Index: 0.72MB + Engine InnoDB
wp_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_relevanssi: Data: 3.52MB + Index: 4.50MB + Engine InnoDB
wp_relevanssi_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_relevanssi_stopwords: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_spbc_auth_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_spbc_backuped_files: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_spbc_backups: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_spbc_firewall_data: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_spbc_firewall_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_spbc_scan_frontend: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_spbc_scan_links_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_spbc_scan_results: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_spbc_scan_signatures: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_spbc_traffic_control_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_termmeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_term_relationships: Data: 0.11MB + Index: 0.08MB + Engine InnoDB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_usermeta: Data: 2.52MB + Index: 3.03MB + Engine InnoDB
wp_users: Data: 0.08MB + Index: 0.05MB + Engine InnoDB
wp_user_registration_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Data: 2.52MB + Index: 3.67MB + Engine InnoDB
wp_wc_order_stats: Data: 0.11MB + Index: 0.11MB + Engine InnoDB
wp_wc_order_tax_lookup: Data: 0.08MB + Index: 0.09MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.13MB + Index: 0.31MB + Engine InnoDB
wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfblockediplog: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wfblocks7: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
wp_wfconfig: Data: 1.43MB + Index: 0.02MB + Engine MyISAM
wp_wfcrawlers: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
wp_wffilechanges: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wffilemods: Data: 2.50MB + Index: 0.50MB + Engine MyISAM
wp_wfhits: Data: 0.53MB + Index: 0.06MB + Engine MyISAM
wp_wfhoover: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wfissues: Data: 0.03MB + Index: 0.01MB + Engine MyISAM
wp_wfknownfilelist: Data: 1.33MB + Index: 0.15MB + Engine MyISAM
wp_wflivetraffichuman: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wflocs: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
wp_wflogins: Data: 0.37MB + Index: 0.08MB + Engine MyISAM
wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfnotifications: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
wp_wfpendingissues: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wfreversecache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wfsnipcache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wfstatus: Data: 0.12MB + Index: 0.05MB + Engine MyISAM
wp_wftrafficrates: Data: 0.02MB + Index: 0.02MB + Engine MyISAM
wp_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpforms_tasks_meta: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
wp_yoast_indexable: Data: 1.11MB + Index: 0.17MB + Engine MyISAM
wp_yoast_indexable_hierarchy: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_yoast_migrations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_yoast_primary_term: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_yoast_seo_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_yoast_seo_meta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM### Post Type Counts ###
attachment: 1680
customize_changeset: 30
custom_css: 1
et_body_layout: 2
et_footer_layout: 1
et_header_layout: 1
et_pb_layout: 3
et_template: 10
et_theme_builder: 3
nav_menu_item: 45
oembed_cache: 1
page: 11
post: 3
product: 523
revision: 922
shop_order: 850
user_registration: 2
wdf_scan: 1
wdf_scan_item: 13
yith_wcan_preset: 1### Security ###
Secure connection (HTTPS): ?
Hide errors from visitors: ?### Active Plugins (20) ###
Advanced Woo Search: by ILLID – 2.47
Akismet Anti-Spam: by Automattic – 4.2.2
Category Banner Management for Woocommerce: by theDotstore – 2.2.2
Better Search Replace: by Delicious Brains – 1.3.4
EWWW Image Optimizer: by Exactly WWW – 6.4.1
Mailchimp for WooCommerce: by Mailchimp – 2.5.4
Product Visibility by User Role for WooCommerce: by WP Wham – 1.7.3
Relevanssi: by Mikko Saari – 4.14.7
Repeat Order for Woocommerce: by polyres – 1.2.0
User Registration: by WPEverest – 2.1.3
User Role Editor: by Vladimir Garagulya – 4.61.1
W3 Total Cache: by BoldGrid – 2.2.1
Checkout Field Editor for WooCommerce: by ThemeHigh – 1.5.3
More Sorting Options for WooCommerce (Premium): by WP Wham – 3.2.8
WooCommerce Shipping & Tax: by WooCommerce – 1.25.23
WooCommerce – ShipStation Integration: by WooCommerce – 4.1.48
WooCommerce: by Automattic – 6.2.0
Wordfence Security: by Wordfence – 7.5.8
WPForms Lite: by WPForms – 1.7.2.1
YITH WooCommerce Ajax Product Filter: by YITH – 4.7.0### Inactive Plugins (4) ###
Role Based Price For WooCommerce: by Varun Sridharan – 3.3.7
WooCommerce Admin: by WooCommerce – 3.1.0
WooCommerce Min/Max Quantities: by WooCommerce – 2.4.19 (update to version 2.4.24 is available)
WP File Manager: by mndpsingh287 – 7.1.4### Dropin Plugins (2) ###
advanced-cache.php: advanced-cache.php
maintenance.php: maintenance.php### Settings ###
API Enabled: –
Force SSL: –
Currency: AUD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)Connected to WooCommerce.com: ?
### WC Pages ###
Shop base: #26 – /shop/
Cart: #27 – /cart/
Checkout: #28 – /checkout/
My account: #920 – /my-account/
Terms and conditions: ? Page not set### Theme ###
Name: Divi
Version: 4.14.8
Author URL: https://www.elegantthemes.com
Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ?### Templates ###
Overrides: –
### Product Visibility by User Role Settings ###
Product Visibility by User Role: yes
Hide catalog visibility: yes
Make non-purchasable: yes
Modify query: no
Hide menu items: no
Hide products terms: no
Redirect:
Redirect URL per product: no
Replace description: no
Content to replace with, e.g.: Log in to see the product description.:
Replace short description: no
Content to replace with, e.g.: Log in to see the product description.:
User roles to display in settings: Array
(
)
Admin products list column: no
Product quick edit: no
Products bulk edit: no
Bulk settings for role guest: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:
Bulk settings for role administrator: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:
Bulk settings for role editor: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:
Bulk settings for role author: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:
Bulk settings for role contributor: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:
Bulk settings for role subscriber: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:
Bulk settings for role customer: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:
Bulk settings for role shop_manager: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:
Bulk settings for role wholesaler: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:
Bulk settings for role blevelprice: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:
Bulk settings for role clevelprice: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:
Bulk settings for role dlevelprice: not set
Enable/Disable:
Hide all:
Products:
Invisible:
Product categories:
Invisible:
Product tags:
Invisible:### More Sorting Settings ###
More Sorting for WooCommerce: yes
License Key: (set)
Out of stock on end: no
Custom Sorting: yes
Sort by date (ascending):
Sort by date (descending):
Sort by title: A to Z: Sort by title: A to Z
Sort by title: Z to A: Sort by title: Z to A
Sort by slug: A to Z:
Sort by slug: Z to A:
Sort by SKU: low to high: Sort by SKU: low to high
Sort by SKU: high to low: Sort by SKU: high to low
Sort by SKU: no
Sort by stock quantity: low to high: Sort by stock quantity: low to high
Sort by stock quantity: high to low: Sort by stock quantity: high to low
Sort by total sales: low to high:
Sort by total sales: high to low:
Sort by last modified date: oldest to newest:
Sort by last modified date: newest to oldest:
Sort by author ID (ascending):
Sort by author ID (descending):
Sort by product ID (ascending):
Sort by product ID (descending):
Sort by number of comments (ascending):
Sort by number of comments (descending):
Random sorting:
No sorting:
Biggest discounts (%): Biggest discounts (%)
Lowest discounts (%): Lower discounts (%)
Biggest discounts: Biggest discounts
Lowest discounts: Lower discounts
Custom Meta Sorting: no
Total Options: 1
Enable/Disable: yes
Type: meta_value
Meta Key:
Secondary Sorting: none
Order: asc
Parameter: custom_sorting_1
Title: Custom Meta Sorting #1
Default Sorting Options: yes
Default sorting: sku-asc
Sort by popularity: Sort by popularity
Remove “Sort by popularity”: yes
Sort by average rating: Sort by average rating
Remove “Sort by average rating”: yes
Sort by newness: Sort by newness
Remove “Sort by newness”: no
Sort by price: low to high: Sort by price: low to high
Remove “Sort by price: low to high”: no
Sort by price: high to low: Sort by price: high to low
Remove “Sort by price: high to low”: no
Rearrange Sorting: yes
Rearrange Sorting: sku-asc
sku-desc
date
price
price-desc
Remove All Sorting (Including WooCommerce Default): no
Enable/Disable: no
Theme: avada### Action Scheduler ###
Complete: 1,062
Oldest: 2022-01-23 23:44:56 +0000
Newest: 2022-02-20 20:48:54 +0000Pending: 8
Oldest: -0001-11-30 00:00:00 +0000
Newest: 2022-02-25 04:00:39 +0000### Status report information ###
Generated at: 2022-02-20 21:11:05 +00:00
`Could you update your WordPress to the latest version to see if that works?
Also, “verify database tables” in WooCommerce -> Status -> Tools
Tried it just now, looks fine.
If I increase the products per page to say 48, no issues. But not ideal.Thanks for letting us know that it worked. You can try altering to other values than 48, may be a little less, and see how it performs.
I found a helpful article about managing the number of products displayed for a product category, that you may find of use: https://wpbeaches.com/change-amount-of-woocommerce-products-on-shop-page/
Sorry what I meant was the “verify database tables” looks fine.
Its not actually fixed.
I can kinda hack it to work by setting the products per page crazy high.
Hi @pagalo
Are you, by chance, using some custom CSS code or plugin to handle your columns and their width?
If so, you can backup them (in case of custom codes) and then remove them all or disable the plugin, and then in a new page, try using a shortcode like this:
[products limit="12" columns="4" orderby="id" order="DESC" visibility="visible"]
If everything fails, have you tried the article that @margaretwporg, kindly, shared with you?
Let us know how it goes!
My very best,
Thanks Andre,
I tried the CSS, remove it all – no luck.
I did try Margarets link and it seemed to just change products per page like the Divi setting. So same result.I made a new page with [products limit=”12″ columns=”4″ orderby=”id” order=”DESC” visibility=”visible” pagination=”true” category=”phone”]
Same result, on about page 3 one product drops off to the next page.
Weirdly if I’m logged in its fine. Logging out and clearing cache shows the glitch.
Doesn’t seem to be a specific product as when I change the amount of product per page it moves the issue to another product/page.Tried W3 cache and no luck same result.
So the only fix so far is to increase the products per page to 48 as then the products dont go past page 3.
Not an ideal fix.Hi @pagalo,
Checking your system status I noticed there is a mismatch between your current WooCommerce core plugin version and your WooCommerce database version:
WC Version: 6.2.0 WC Database Version: 3.9.2
Often times this mismatch causes issues and I’ve also noticed it on other sites users reported on this forum.
Since updating the database is a big jump we suggest duplicating your current site and performing the update there without affecting your live site. It’s possible to do it either using the staging facility from your host (if available) or using the free WP Staging plugin.
Before updating the database you could also try purging the cache from your W3 Total Cache plugin and clearing the server-side caching. Contact your host directly if your admin panel doesn’t have an option to clear the cache.
Let us know how it goes.
Thanks, done. Still no luck.
Could the category page code have been modified – where would that be located?Hello,
Thanks for making the database upgrade!
Is this issue still visible on your site? I was trying to reproduce it in the “Lighting” category page to get a better understanding of how it manifests itself, but I’m having no luck.
Were you able to create the staging site? If not, I would recommend that you go ahead and create one so that you can perform additional troubleshooting without disrupting your live site. In the staging site, you can start by setting your theme to Storefront and disabling all plugins except for WooCommerce.
Then, if the issue still happens in the staging site, please send us a screenshot using https://snipboard.io/. Just paste the link here after uploading the image.
We haven’t heard back from you in a while, so I’m going to mark this thread as resolved – we’ll be here if and/or when you are ready to continue.
Weirdly it turned out to be the plugin that hide products based on customer level, wholesaler etc…
Turning it off didnt help but removing products wrongly set to an admin category did.
Thanks! - Your System Status: You can find it via
- The topic ‘Products on category page sometimes ends in an odd amount’ is closed to new replies.