Shapes Posted August 12, 2021 Share Posted August 12, 2021 Hello, I am unable to access an order in admin, page shows error: An exception has been thrown during the rendering of a template ("DateInterval::__construct(): Unknown or bad format (PD)"). [Twig\Error\RuntimeError 0] Any idea on what could be going on there, and how to get this solved please? Other orders are displaying fine. Using PrestaShop 1.7.7.5. Link to comment Share on other sites More sharing options...
SmartDataSoft Posted August 12, 2021 Share Posted August 12, 2021 Hello, what is your php version , is this new PrestaShop installation or you update from old version. You can enable the debug mode from backend Performance to check more details error. after enable debug post the erorr here community member will help you Thank you Link to comment Share on other sites More sharing options...
Shapes Posted August 13, 2021 Author Share Posted August 13, 2021 Hi, Thanks for your answer. PHP version is 7.3.29. Install version was 1.7.7.4. I did not try debug yesterday as one of the payment solutions was messing with the debug mode in dev environment. On the production side it seems to be available, so with debug mode enabled I get 2 exceptions: Twig\Error\ RuntimeError in src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig (line 85) {{ renderhook('displayAdminOrderMainBottom', {'id_order': orderForViewing.id}) }} Exception DateInterval::__construct(): Unknown or bad format (PD) in modules/chronopost/chronopost.php (line 1828) $daysAfter = Configuration::get('CHRONOPOST_CHRONOFRESH_DLC'); $now = new DateTime(); $dlc_default = $now->add(new DateInterval("P{$daysAfter}D"))->format("Y-m-d"); Looks like Chronopost module is bugging right there, I will try to contact them. Link to comment Share on other sites More sharing options...
SmartDataSoft Posted August 13, 2021 Share Posted August 13, 2021 Hello, Yes module chronopost made this occur , bellow code try to made data time the give data which made the problem. This may be done the oder $daysAfter variable value which break the constructor Thank you 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