Jump to content

Category page works fine for all categories except one


safius

Recommended Posts

That one category seems to fetch no products from the database, while all other categories fetch all their products as intended.

When I check from the back-office, I come across this weird behavior: If I look up a product that should be in that category and go to the Associations tab, I can see that it indeed belongs to the category in question.
If, however, I look up the category from the Catalog>Categories page, it brings up no products associated with it.

 

I checked the database directly and I see nothing obviously off. This is a record that DOES NOT show up (top), versus one that DOES show up (from a different category): 

 

2ymu9hw.jpg

 

(cont'd)

2ln72o8.jpg

 

(cont'd)

20itief.jpg

 

(cont'd)

308cs4m.jpg

 

(cont'd)

23m8v13.jpg

 

(cont'd)

2ugii6r.jpg

 

(cont'd)

jkgcig.jpg

 

 

I tried to output the sql query executed in Category::getProducts() and run it independently in my database console, and it fetches 1 product, as there is a "LIMIT 0,1" statement appended at the end of the query.

 

Three issues with that:

1. "LIMIT 0,1" appears in the query for every category, even the working ones that fetch more than 1 products.

2. "LIMIT 0,1" should still return 1 product (and it does when run directly in the console), which is never displayed.

3. If I remove the LIMIT statement, I get 29 results in the query result, but still nothing is displayed in the category page.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...