menegonfabio Posted July 22, 2021 Share Posted July 22, 2021 (edited) Hello everyone!! Browsing my test shop in Prestashop, until yesterday, clicking on "All products" in the product showcase made me a list of all the products. This morning, always clicking on "All products" makes me enter the "HOME" category but without any product list. Would anyone know how to help me ?? Below I leave an image so as to better understand the situation. Thanks in advance for who will answer. PrestaShop version: 1.7.7.5 PHP version: 7.4.21 Edited July 23, 2021 by menegonfabio (see edit history) Link to comment Share on other sites More sharing options...
SmartDataSoft Posted July 22, 2021 Share Posted July 22, 2021 Hello, Did you modify any template file like category.tpl or etc. from perfromance you can disable the cache and then check. It looks some kind of modification is done in template when cache auto clear they render from original template. You can enable the debug mode from Performance and check is their any error show or not Thank you Link to comment Share on other sites More sharing options...
menegonfabio Posted July 22, 2021 Author Share Posted July 22, 2021 @SmartDataSoft The only change I made was in the "Category-header.tpl" file, but that's not what gives me the problem. I activated the debugger as recommended and doing the action that gives me problems gives me the error you see in the image below. (Unfortunately I still don't have this knowledge from understanding something, by any chance would you be able to help me? I would be grateful) Link to comment Share on other sites More sharing options...
SmartDataSoft Posted July 22, 2021 Share Posted July 22, 2021 Hello, the error indicate that you try to access a value is is null . You need to check null value line 35 of your Category-header.tp Null value handel will prevent this. So when value got they will work other wise not. {if !($array|is_empty)} Array is not empty {else} Array is empty {/if} Thank you Link to comment Share on other sites More sharing options...
menegonfabio Posted July 22, 2021 Author Share Posted July 22, 2021 (edited) @SmartDataSoft Sorry, but I can't figure out what's problematic. The file was not touched except from line 45 onwards. Below is the image of the Category-header.tpl file Edited July 22, 2021 by menegonfabio (see edit history) Link to comment Share on other sites More sharing options...
SmartDataSoft Posted July 22, 2021 Share Posted July 22, 2021 Please use isset for the variable as level 4 is not found all time thank you Link to comment Share on other sites More sharing options...
menegonfabio Posted July 22, 2021 Author Share Posted July 22, 2021 18 minuti fa, SmartDataSoft dice: Si prega di utilizzare isset per la variabile poiché il livello 4 non viene sempre trovato grazie I put isset() to line variable 35, but it didn't solve, did I write wrong ?? {if isset($category.image.large.yrl)} Link to comment Share on other sites More sharing options...
SmartDataSoft Posted July 22, 2021 Share Posted July 22, 2021 (edited) Please use for it. {if isset($category.level_depth)} I think the issue will solved. thank you Edited July 22, 2021 by SmartDataSoft code correction (see edit history) Link to comment Share on other sites More sharing options...
menegonfabio Posted July 22, 2021 Author Share Posted July 22, 2021 3 minuti fa, SmartDataSoft dice: Please use for it. {if ! isset($category.level_depth)} I think the issue will solved. thank you It is not solved, but if it hits the if loop I should replace it with a foreach loop, as the subcategories are not always 4, so I would like it to count the subcategories and when I reach the last one, print the table. I would have asked in yesterday's discussion, but since it came out in this one, I take advantage of it. But I've already tried doing a foreach loop, but it doesn't work for me Link to comment Share on other sites More sharing options...
SmartDataSoft Posted July 22, 2021 Share Posted July 22, 2021 Please use use isset in place of !isset i have update the code block Thank you Link to comment Share on other sites More sharing options...
menegonfabio Posted July 22, 2021 Author Share Posted July 22, 2021 49 minuti fa, SmartDataSoft dice: Please use use isset in place of !isset i have update the code block Thank you @SmartDataSoft This is the result I get: Link to comment Share on other sites More sharing options...
Danny Posted July 22, 2021 Share Posted July 22, 2021 5 hours ago, menegonfabio said: Hello everyone!! Browsing my test shop in Prestashop, until yesterday, clicking on "All products" in the product showcase made me a list of all the products. This morning, always clicking on "All products" makes me enter the "HOME" category but without any product list. Would anyone know how to help me ?? Below I leave an image so as to better understand the situation. Thanks in advance for who will answer. PrestaShop version: 1.7.7.5 PHP version: 7.4.21 Il tuo PS non è compatibile con php 7.4, scendi al 7.3, pulisci la cache, compresa quella del browser. Your PS is incompatible with php 7.4. Danny Link to comment Share on other sites More sharing options...
menegonfabio Posted July 22, 2021 Author Share Posted July 22, 2021 @Danny Fino a ieri andava, non ho cambiato ne versione di PS nè quella di PHP, come può di punto in bianco non andare bene la versione?? Link to comment Share on other sites More sharing options...
Danny Posted July 22, 2021 Share Posted July 22, 2021 3 minutes ago, menegonfabio said: @Danny Fino a ieri andava, non ho cambiato ne versione di PS nè quella di PHP, come può di punto in bianco non andare bene la versione?? non vuol dire niente. Andava male. Al massimo con php e quella versione puoi arrivare alla 7.3 se no prima o poi ti saltano fuori problemi che poi non si capisce da dove arrivano. Attenzione non sto dicendo che il problema che hai sia strettamente collegato (può essere). Quello che ti sto dicendo è che non puoi stare con quella versione php. Poi vedi gli eventuali problemi che hai. Magari li risolvi, magari ti accorgi di altro. Quello che è sicuro è che conviene partire da una base pulita. Questo intendo. e con php 7.4 non lo è. https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/ Danny Link to comment Share on other sites More sharing options...
menegonfabio Posted July 23, 2021 Author Share Posted July 23, 2021 @Danny I have installed a new version of PHP and everything restarted normally, thank you. Link to comment Share on other sites More sharing options...
Danny Posted July 23, 2021 Share Posted July 23, 2021 2 hours ago, menegonfabio said: @Danny I have installed a new version of PHP and everything restarted normally, thank you. Bene. 🙂 Danny Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now