Jump to content

Any code expert can help fix this message from the debug mode?


Recommended Posts

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 articlehttps://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 by De La Riviere (see edit history)
Link to comment
Share on other sites

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);?>

  • Like 1
Link to comment
Share on other sites

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...