lucifer_1 Posted November 8, 2022 Share Posted November 8, 2022 We have an error on our shop, a lot of the same errors (warnings). In de bug modus we find thise: Quote (1/1) ContextErrorException Warning: Use of undefined constant _PS_PRODUCT_IMG_DIR_ - assumed '_PS_PRODUCT_IMG_DIR_' (this will throw an Error in a future version of PHP) in ImageRetriever.php line 148 at ImageRetriever->getImage(object(Product), '12554') in ImageRetriever.php line 94 at ImageRetriever->PrestaShop\PrestaShop\Adapter\Image\{closure}(array('cover' => '1', 'id_image' => '12554', 'legend' => 'Stickers - Stippen en strepen', 'position' => '1')) at array_map(object(Closure), array(array('cover' => '1', 'id_image' => '12554', 'legend' => 'Stickers - Stippen en strepen', 'position' => '1'))) in ImageRetriever.php line 88 And on our error log this: The whole log is full of this warnings. Quote [Tue Nov 08 08:35:35.273771 2022] [lsapi:warn] [pid 4674:tid 140709524240128] [client 88.198.158.233:38310] [host **website**] Backend log: PHP Warning: Use of undefined constant _PS_PRODUCT_IMG_DIR_ - assumed '_PS_PRODUCT_IMG_DIR_' (this will throw an Error in a future version of PHP) in /home/u18441p60194/domains/**website**/public_html/src/Adapter/Image/ImageRetriever.php on line 148\n Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted November 8, 2022 Share Posted November 8, 2022 first check if this constant "_PS_PRODUCT_IMG_DIR_" is defined in the settings/config files 1 1 Link to comment Share on other sites More sharing options...
lucifer_1 Posted November 9, 2022 Author Share Posted November 9, 2022 In defines.inc.php i can find: define('_PS_PROD_IMG_DIR_', _PS_IMG_DIR_.'p/'); Link to comment Share on other sites More sharing options...
ps8modules Posted November 9, 2022 Share Posted November 9, 2022 Hi. Add another variable below this line. define('_PS_PRODUCT_IMG_DIR_', _PS_IMG_DIR_.'p/'); 1 Link to comment Share on other sites More sharing options...
ps8modules Posted November 9, 2022 Share Posted November 9, 2022 Probably Prestashop has been updated and some files or overrides are not valid for the current version. 1 Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted November 10, 2022 Share Posted November 10, 2022 @lucifer_1 - as mentioned by @4you.software you may add that line to solve the problem cause the constant name is different then the one mentioned by you 1 1 Link to comment Share on other sites More sharing options...
lucifer_1 Posted November 10, 2022 Author Share Posted November 10, 2022 Thank you, i added the variable. I will wait and see if this solves the warning. You guys are great! 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