Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orders history blank page in front office #15956

Closed
jajarom opened this issue Oct 15, 2019 · 11 comments
Closed

Orders history blank page in front office #15956

jajarom opened this issue Oct 15, 2019 · 11 comments

Comments

@jajarom
Copy link

@jajarom jajarom commented Oct 15, 2019

Describe the bug
Orders history blank page in front office after fresh 1.7.6.1 install, migrate important files and changed the theme.

Steps to reproduce the issue:

  1. Fresh install PS1.7.6 with EN language & FR country
  2. Import the United states=> Dollar currency created / Import the Switzerland pack => CHF currency created
  3. create some order with those currencies
  4. Set the CHF currency by default
  5. Delete the Euro & Dollar currencies
  6. Go to the FO => The order history page => an exception displayed

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'www.gpg.ro/new'
  2. Login with Test@test.ro / 12345678
  3. Click on Istoric si detalii ale comenzilor
  4. Blank page

After enable the Dev mode and module troubleshooting, this is what i get, with some details

(1/1) LocalizationException Price specification not found for currency: ""

in Locale.php line 171
at Locale->getPriceSpecification('')in Locale.php line 155
at Locale->formatPrice('430.000000', null)in Tools.php line 776
at ToolsCore::displayPrice('430.000000', object(Currency))in PriceFormatter.php line 55
at PriceFormatter->format('430.000000', object(Currency))in OrderLazyArray.php line 238
at OrderLazyArray->getAmounts()in OrderLazyArray.php line 99
at OrderLazyArray->getTotals()in AbstractLazyArray.php line 241
at AbstractLazyArray->offsetGet('totals')in fc46b1e0cbbacfd9412d9e0a6bd2a588a99e8d51_2.file.history.tpl.php line 103
at Block_9051592935da595cfdcde36_99340072->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248
at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_9051592935da595cfdcde36_99340072), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184
at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_9051592935da595cfdcde36_99340072), object(Block_13440336845da595cfe041e9_87347152))in smarty_internal_runtime_inheritance.php line 186
at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_13440336845da595cfe041e9_87347152))in smarty_internal_runtime_inheritance.php line 156
at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_13440336845da595cfe041e9_87347152', 'page_content', 1)in 53cb7ce6a5986d3835b573cc8e1ead0330e841de_2.file.page.tpl.php line 309
at Block_13229827415da595cfde9f66_13283710->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248
at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_13229827415da595cfde9f66_13283710), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184
at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_13229827415da595cfde9f66_13283710), object(Block_19154507295da595cfe0e066_39842925))in smarty_internal_runtime_inheritance.php line 186
at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_19154507295da595cfe0e066_39842925))in smarty_internal_runtime_inheritance.php line 156
at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_19154507295da595cfe0e066_39842925', 'page_content_container', 2)in 814f6da807b883410410f91dc608a86e962f71dd_2.file.page.tpl.php line 181
at Block_18456035da595cfe0be90_43996641->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248
at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_18456035da595cfe0be90_43996641), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184
at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_18456035da595cfe0be90_43996641), object(Block_7179943535da595cfe1ade1_12621239))in smarty_internal_runtime_inheritance.php line 186
at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_7179943535da595cfe1ade1_12621239))in smarty_internal_runtime_inheritance.php line 156
at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_7179943535da595cfe1ade1_12621239', 'content', 3)in f4493d479200ffc1252715fdfc5e008b529ad79e_2.file.layout-full-width.tpl.php line 135
at Block_16529626185da595cfe19bc2_84708852->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248
at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_16529626185da595cfe19bc2_84708852), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184
at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_16529626185da595cfe19bc2_84708852), object(Block_8112363355da595cfe2ee85_59111765))in smarty_internal_runtime_inheritance.php line 186
at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_8112363355da595cfe2ee85_59111765))in smarty_internal_runtime_inheritance.php line 156
at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_8112363355da595cfe2ee85_59111765', 'content_wrapper')in 28439e758fed3aba3411ef1bc4ab6ebc03d68e96_2.file.layout-both-columns.tpl.php line 91
at content_5da595cfe44137_87899920(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123
at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114
at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216
at Smarty_Internal_Template->render()in smarty_internal_template.php line 385
at Smarty_Internal_Template->_subTemplateRender('layouts/layout-both-columns.tpl', null, 'layouts/layout-full-width.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125
at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-both-columns.tpl')in f4493d479200ffc1252715fdfc5e008b529ad79e_2.file.layout-full-width.tpl.php line 50
at content_5da595cfe1c405_36193237(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123
at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114
at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216
at Smarty_Internal_Template->render()in smarty_internal_template.php line 385
at Smarty_Internal_Template->_subTemplateRender('layouts/layout-full-width.tpl', null, 'layouts/layout-full-width.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125
at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-full-width.tpl')in 814f6da807b883410410f91dc608a86e962f71dd_2.file.page.tpl.php line 33
at content_5da595cfe11728_27339017(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123
at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114
at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216
at Smarty_Internal_Template->render()in smarty_internal_template.php line 385
at Smarty_Internal_Template->_subTemplateRender('page.tpl', null, 'layouts/layout-full-width.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125
at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'page.tpl')in 53cb7ce6a5986d3835b573cc8e1ead0330e841de_2.file.page.tpl.php line 51
at content_5da595cfe06c20_06261670(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123
at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114
at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216
at Smarty_Internal_Template->render()in smarty_internal_template.php line 385
at Smarty_Internal_Template->_subTemplateRender('customer/page.tpl', null, 'layouts/layout-full-width.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125
at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'customer/page.tpl')in fc46b1e0cbbacfd9412d9e0a6bd2a588a99e8d51_2.file.history.tpl.php line 38
at content_5da595cfde3476_52407291(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123
at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114
at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216
at Smarty_Internal_Template->render(false, 0)in smarty_internal_templatebase.php line 232
at Smarty_Internal_TemplateBase->_execute(object(SmartyDevTemplate), null, 'layouts/layout-full-width.tpl', null, 0)in smarty_internal_templatebase.php line 116
at Smarty_Internal_TemplateBase->fetch('customer/history.tpl', null, 'layouts/layout-full-width.tpl', null, false, true, false)in SmartyDev.php line 40
at SmartyDev->fetch('customer/history.tpl', null, 'layouts/layout-full-width.tpl')in FrontController.php line 683
at FrontControllerCore->smartyOutputContent('customer/history.tpl')in FrontController.php line 667
at FrontControllerCore->display()in Controller.php line 312
at ControllerCore->run()in Dispatcher.php line 515
at DispatcherCore->dispatch()in index.php line 28

Dev error log

Stack trace:
#0 /home/dual34/public_html/new/src/Core/Localization/Locale.php(155): PrestaShop\PrestaShop\Core\Localization\Locale->getPriceSpecification('')
#1 /home/dual34/public_html/new/classes/Tools.php(776): PrestaShop\PrestaShop\Core\Localization\Locale->formatPrice('430.000000', NULL)
#2 /home/dual34/public_html/new/src/Adapter/Product/PriceFormatter.php(55): ToolsCore::displayPrice('430.000000', Object(Currency))
#3 /home/dual34/public_html/new/src/Adapter/Presenter/Order/OrderLazyArray.php(238): PrestaShop\PrestaShop\Adapter\Product\PriceFormatter->format('430.000000', Object(Currency))
#4 /home/dual34/public_html/new/src/Adapter/Presenter/Order/OrderLazyArray.php(99): PrestaShop\PrestaShop\Adapter\Presenter\Order\OrderLazyArray->getAmounts()
#5 /home/dual34/public_html/new/src/Adapter/Presenter/AbstractL in /home/dual34/public_html/new/src/Core/Localization/Locale.php on line 171

Image link

PrestaShop version: 1.7.6.1
PHP version: 7.0

Thank you

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

@khouloudbelguith khouloudbelguith commented Oct 15, 2019

Hi @jajarom,

When the troubleshooting module is disabled, this issue occurs?
Did you delete any currency?
Is this a fresh install PS1.7.6.1 or an upgrade from previous version?

Thanks!

@jajarom

This comment has been minimized.

Copy link
Author

@jajarom jajarom commented Oct 15, 2019

When troubleshooting module is disabled clients get blank page.
Fresh install and then migrate old products, clients, orders, cms...from 1.6.

yeakkk

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

@khouloudbelguith khouloudbelguith commented Oct 15, 2019

@jajarom, could you please provide me a screenshot about you table ps_currency
image
Have you tried to contact the theme author about this issue? thanks to check with them & feedback.

@jajarom

This comment has been minimized.

Copy link
Author

@jajarom jajarom commented Oct 15, 2019

yeakkk2
From myphp

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

@khouloudbelguith khouloudbelguith commented Oct 15, 2019

@jajarom, Thanks for your feedback.
I manage to reproduce the issue with PS1.7.6.1 & PS1.7.6.0.

  1. Fresh install PS1.7.6 with EN language & FR country
  2. Import the United states=> Dollar currency created / Import the Switzerland pack => CHF currency created
  3. create some order with those currencies
  4. Set the CHF currency by default
  5. Delete the Euro & Dollar currencies
  6. Go to the FO => The order history page => an exception displayed

With PS1.7.5.2 => It is OK.
image

I’ll add this to the debug roadmap so that it’s fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!

@jajarom

This comment has been minimized.

Copy link
Author

@jajarom jajarom commented Oct 15, 2019

What would be the solution for me?

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

@khouloudbelguith khouloudbelguith commented Oct 15, 2019

@jajarom, it is Major regression, so, it will be fixed soon.
Thanks for your understanding!

@jolelievre

This comment has been minimized.

Copy link
Contributor

@jolelievre jolelievre commented Oct 15, 2019

@khouloudbelguith @jajarom This bug was already identified in #15376 and #15486
The PR fixing this issue was merged this morning #15643

@jolelievre

This comment has been minimized.

Copy link
Contributor

@jolelievre jolelievre commented Oct 15, 2019

Since we only tested the BO bugs, maybe it's worth testing if the fix also works on FO (although it should)

@jajarom

This comment has been minimized.

Copy link
Author

@jajarom jajarom commented Oct 15, 2019

I understand. If I let the data in private you could help me? I wouldn't want to do something stupid

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

@khouloudbelguith khouloudbelguith commented Oct 15, 2019

@jolelievre, yes! Great, it is fixed with Branch 1.7.6.x
https://drive.google.com/file/d/1jtYnmA4B-b422upsUwx4iqsFaglC_hFQ/view
@jajarom, this issue should be fixed in the PS1.7.6.2.
I close the issue, feel free to open a new one when needed.

Thanks!

@khouloudbelguith khouloudbelguith added Fixed and removed To Do labels Oct 15, 2019
@khouloudbelguith khouloudbelguith added this to the 1.7.6.2 milestone Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.