- Priority: 0
- Status: Closed
- Theme: Alysum
-
Assigned To:
Marek
- Private: No
- Open Date: 05.12.18, 03:06
- Opened by: Julien
- Closed by: Marek
- Closed on: 02.01.19, 14:48
- Reason: Closed
- Comment: Glad to help!
Ticket #13322 - Titles and description not displayed on category pages
Dear Marek,
The displaying of products on the category page of Alysum seems to have crashed: titles and product descriptions are not shown, and some products are displayed twice.
Example:
https://www.bioseblab.com/en/2-bioseblab-equipment
Could you please have a look and let me know what seems to be the problem?
Thanks in advance for your help,
Julien
Comments
Hi, Julien.
How it happens? maybe you have installed some additional module?
Hi Marek,
Thanks for the quick reply. No, nothing has new has been installed recently - which baffles me.
Cheers,
Julien
Ok, I see. Working to find a solution as soon as possible
Try to restore original file “/themes/alysum/templates/catalog/_partials/miniatures/product.tpl”
Just tried that - does not help. Same problem…
I have found out there is no names even in deep code what generates inside prestashop → http://take.ms/0TnF0 so I’m not sure it’s a theme’s issue
Do you remember what have you done before the issue appeared?
Dear Marek, I have checked everything - nothing special has been done on the website the past few weeks. No changes in the code, nothing.
I have no clue what could cause this problem, especially since the product titles are displayed properly on the product page - just not on the Category page, even when resetting it to the original version.
Any idea?
Update: the problem seems to come from the fact that classes/category.php is not able to read the content of $id_lang in following command:
$sql = ‘SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) AS quantity’.(Combination::isFeatureActive() ? ‘, IFNULL(product_attribute_shop.id_product_attribute, 0) AS id_product_attribute,
If I change pl.`id_lang` = ‘.(int)$id_lang.Shop::addSqlRestrictionOnLang(’pl’).’ into pl.`id_lang` = 1
Then the category page displays everything (but of course only in language 1, which is English).
Any idea why the page would not be able to access $id_lang all of a sudden?
Thanks a lot in advance…
So it happens that the variable used in the category.php file should have been $idLang, and not $id_lang.
We never touched this, and I have no clue how this could have happened.
What is your Prestabhop version? maybe it’s a known bug
1.7.4.3
I’ve looked for a known bug, could not find anything.
Anyway - it seems fixed now - but I thought you’d want to know what it was, as you might have other customers with the same issue.
Thank you for sharing the solution!