HH Services Limited Posted March 18, 2015 Share Posted March 18, 2015 (edited) http://www.goodpsychologists.com/en/online-psychology/1-online-psychologist.html Thanks!! Edited March 18, 2015 by De La Riviere (see edit history) Link to comment Share on other sites More sharing options...
HH Services Limited Posted March 18, 2015 Author Share Posted March 18, 2015 I´ve found this article, https://github.com/PrestaShop/PrestaShop/commit/c5ec25bf571bb4bedb71a4cc85f8abc7f1dc8e2e but I guess its for a different prestashop, because when I open controllers/admin/AdminCustomersController.php I cannot find the code shown in there... Link to comment Share on other sites More sharing options...
vekia Posted March 19, 2015 Share Posted March 19, 2015 if you turn off cache (preferences > performance) problem remain the same? Link to comment Share on other sites More sharing options...
HH Services Limited Posted March 19, 2015 Author Share Posted March 19, 2015 (edited) if you turn off cache (preferences > performance) problem remain the same?, Yes its off right now and the problem remains. At cloudways they have tried things and at the end they told me to contact the developer... The truth is that in localhost in my computer it is working fine, and in a shared environment it was as well. I´ve found this article, https://github.com/PrestaShop/PrestaShop/commit/c5ec25bf571bb4bedb71a4cc85f8abc7f1dc8e2e but I guess its for a different prestashop, because when I open controllers/admin/AdminCustomersController.php I cannot find the code shown in there... I must to add that this problem is happening on 2 different shops and in all products´ pages only, the rest of the pages are ok... Edited March 19, 2015 by De La Riviere (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted March 19, 2015 Share Posted March 19, 2015 Are you using a custom theme? The issue appears to be around the products availability date. So I would start by confirming what the value of this date is in the database? <span id="availability_date_value"><?php echo $_smarty_tpl->smarty->registered_plugins[smarty::PLUGIN_FUNCTION]['dateFormat'][0][0]->dateFormat(array('date'=>$_smarty_tpl->tpl_vars['product']->value->available_date,'full'=>false),$_smarty_tpl);?> 1 Link to comment Share on other sites More sharing options...
Gregory Roussac Posted March 20, 2015 Share Posted March 20, 2015 Hi, Can you please try to replace for a test this line https://github.com/PrestaShop/PrestaShop/blob/1.6/themes/default-bootstrap/product.tpl#L219 to {p var=$product} {d var=$product->available_date} Please disable profiling too. Thank you. Regards 1 Link to comment Share on other sites More sharing options...
Gregory Roussac Posted March 20, 2015 Share Posted March 20, 2015 Hi again, This should avoid the exception when a bad date is sent to the product template. https://github.com/PrestaShop/PrestaShop/pull/2716/files Regards 1 Link to comment Share on other sites More sharing options...
HH Services Limited Posted March 20, 2015 Author Share Posted March 20, 2015 Sorry, I just got the message... You placed two posts. In one you ask me to replace that piece of code and in the other one you don´t. Which one I follow? Thank you so much... Link to comment Share on other sites More sharing options...
Gregory Roussac Posted March 20, 2015 Share Posted March 20, 2015 Hey, First will tell us why this date is not correct in database. Just a test so. Second should skip the Exception when this date is not correct. Regards 1 Link to comment Share on other sites More sharing options...
HH Services Limited Posted March 20, 2015 Author Share Posted March 20, 2015 Hey, First will tell us why this date is not correct in database. Just a test so. Second should skip the Exception when this date is not correct. Regards So I replace the code with the one that you provided in the 1st post or I just delete it? Link to comment Share on other sites More sharing options...
HH Services Limited Posted March 20, 2015 Author Share Posted March 20, 2015 Hi, Can you please try to replace for a test this line https://github.com/PrestaShop/PrestaShop/blob/1.6/themes/default-bootstrap/product.tpl#L219 to {p var=$product} {d var=$product->available_date} Please disable profiling too. Thank you. Regards I just did, please take a look: http://www.goodpsychologists.com/en/online-psychology/1-online-psychologist.html Link to comment Share on other sites More sharing options...
HH Services Limited Posted March 20, 2015 Author Share Posted March 20, 2015 Sorry, on one post You ask to place this: <span id="availability_date_value">{if Validate::isDate($product->available_date)}{dateFormat date=$product->available_date full=false}{/if}</span> and on another one this: {p var=$product} {d var=$product->available_date} I used the second one, whichone shoul I use? Link to comment Share on other sites More sharing options...
Gregory Roussac Posted March 20, 2015 Share Posted March 20, 2015 Hi, So the faulty date is [available_date] => 2100-00-00 I do not know how you came to this. Importing products ? but this date in database is wrong. You can replace the code by the second commit. Regards 1 Link to comment Share on other sites More sharing options...
HH Services Limited Posted March 20, 2015 Author Share Posted March 20, 2015 Hi, Sot the faulty date is [available_date] => 2100-00-00 I do not know how you came to this. Importing products ? but this date in database is wrong. You can replace the code by the second commit. Regards Thank you soooooo much you are the best!!! It was this date and actually changing the available date in the back office fixed the problem.... I had left this date in shared hosting and in local host and it was working fine, but when I switched to Cloudways at digital oceans plan it gave the problem... still puzzled about this, but the main thing is that I solved it and thaks to you!!! Also big thanks to Vekia Bellini13. Gregory Roussac, Thank you so much!!! Link to comment Share on other sites More sharing options...
Gregory Roussac Posted March 20, 2015 Share Posted March 20, 2015 Hi again, Thank you for your feedback and encouraging comments. This seems to be also an issue with combinations. This PR should prevent this https://github.com/PrestaShop/PrestaShop/pull/2717/files Best regards Link to comment Share on other sites More sharing options...
HH Services Limited Posted March 20, 2015 Author Share Posted March 20, 2015 Hi again, Thank you for your feedback and encouraging comments. This seems to be also an issue with combinations. This PR should prevent this https://github.com/PrestaShop/PrestaShop/pull/2717/files Best regards Hello again Gregory. Are you suggesting to make all those changes? The shop seems to be doing ok now.... Link to comment Share on other sites More sharing options...
Gregory Roussac Posted March 20, 2015 Share Posted March 20, 2015 No just letting you know your feeback led to changes for future version of PrestaShop. Regards 1 Link to comment Share on other sites More sharing options...
selectshop.at Posted March 20, 2015 Share Posted March 20, 2015 Problem applies to which Prestashop version please ? Link to comment Share on other sites More sharing options...
HH Services Limited Posted March 20, 2015 Author Share Posted March 20, 2015 Thank you again Gregory... selectshop.at, I had this problem with Ps: 1.6.0.6 and 1.6.0.8 Link to comment Share on other sites More sharing options...
selectshop.at Posted March 20, 2015 Share Posted March 20, 2015 Thank you. I had this on a customer page too PS 1.6.0.8 today, that's why I've asked.... Already changed according github and all is fine now. 1 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