bagisto
bagisto copied to clipboard
Product saved; product not shown in admin/catalog/products and/or website "No products available in this category"
Issue Description
When i add a product using /admin/catalog/products/create the product is saved (green message product saved) after that a redirect to admin/catalog/products/edit/2 I fill in what is required, hit save. Again, the green box said saved. Then a redirect to admin/catalog/products; but no products.
On the public site (i added several products to main category and subcategory). When i visit category i get:
Whoops! No products available in this category
Bagisto Version
1.4.3 PHP8.1 / MySQL / latest composer Ubuntu server
Steps To Reproduce
See above.
Actual Result
Using the debugbar i found a query with a possible error:
select count(*) as aggregate from (select product_flat
.locale
, product_flat
.channel
, product_flat
.product_id
, products
.sku
as product_sku
, product_flat
.product_number
, product_flat
.name
as product_name
, products
.type
as product_type
, product_flat
.status
, product_flat
.price
, product_flat
.url_key
, attribute_families
.name
as attribute_family
, SUM(product_inventories.qty) as quantity from product_flat
left join products
on product_flat
.product_id
= products
.id
left join attribute_families
on products
.attribute_family_id
= attribute_families
.id
left join product_inventories
on product_flat
.product_id
= product_inventories
.product_id
where product_flat
.locale
in ('nl') and product_flat
.channel
in ('default') group by product_flat
.product_id
, product_flat
.locale
, product_flat
.channel
) as aggregate_table
when i run this in phpmyadmin:
#1055 - Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'product_flat.product_number' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Expected Result
The products in database should show up somewhere
Hi there, I guess the status of the product is inactive so the products are not listed in the shop. Please verify it and let me know.
I cannot edit the stored products because they are not visibile in the admin (admin/catalog/products). Then i have to type in the address bar "admin/catalog/products/edit/1" to edit my products. Yes, the status was grey; i changed it to blue. Saved; but still no products in admin and/or website.
@lukasmedia Is it possible to share the screen recording for the same it will help me to reproduce the issue?
Not really a lot to show but here is the admin:
https://ibb.co/KGDNc3L
and here product detail (remember, i have to type "admin/catalog/products/edit/1" in address bar)
https://ibb.co/fd0L4tJ
FYI i already did 3 installs; 2 via zip download, extract, composer install and installation via artisan and installation via composer. All the same results.
Also, database is filled with data. What do you need more? This seems like a major bug to me.
Not able to reproduce this, have you done some customization or added some modules?
No; clean install.
Hi there, Please enable Visible Individually, the issue will be resolved.
Hi @Sanjaybhattweb thank you; but that didnt help. There is a query error.
The source seems to be "sql_mode=only_full_group_by" so i removed "only_full_group_by" in the my.cnf from Mysql. Restarted mysql but the issue is still there.
I have this same problem. +1
The products are added to the DB and viewable from the Customer portal and also accessible via direct slugs but not listed in the Admin Catalog.
Is it possible to share the screen recording for the same?
Not able to reproduce this, please use Bagisto forum.