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

Error in BO order page after deleting a currency used in an order #15376

Closed
khouloudbelguith opened this issue Sep 3, 2019 · 35 comments
Closed

Error in BO order page after deleting a currency used in an order #15376

khouloudbelguith opened this issue Sep 3, 2019 · 35 comments

Comments

@khouloudbelguith
Copy link
Contributor

@khouloudbelguith khouloudbelguith commented Sep 3, 2019

Describe the bug
Issue created from this comment: #14595 (comment) reported by @presciak & @Kis-shoes
image

Steps: 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. Try to add a cart with amount reduction
  5. Set the status of your orders to Delivered
  6. Set the CHF currency by default
  7. Delete the Euro & Dollar currencies
  8. Go back to the BO => Orders page => an exception displayed
    image
    Additional information
    PrestaShop version: 1.7.6.1
@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 3, 2019

Hi @presciak & @Kis-shoes,

Can you please provide us the exact steps to reproduce the issue.
What is th exact version did you use of the 1-click upgrade module?
Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 3, 2019

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 3, 2019

Hi @Kis-shoes,

Thanks for your feedback.
I did not manage to reproduce the issue with PS1.7.6.1 fresh install & after upgrade from PS1.7.6.0 where I reproduced the issue.
I attached a screen record
https://drive.google.com/file/d/1NdV7ImvClzvpe4fe3h4puWg4jhs-9r-P/view
Thanks to check & feedback.

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 3, 2019

Hi @khouloudbelguith,

Below link is what my BO produces when I click on order tab
Bug Mode order issue_
The issue is similar to the one replicate hier https://drive.google.com/file/d/1NdV7ImvClzvpe4fe3h4puWg4jhs-9r-P/view

However, my PS version is PS1.7.6.1

Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 3, 2019

@Kis-shoes, could you please follow those files https://github.com/PrestaShop/PrestaShop/pull/15173/files & check on your PrestaShop Project are well updated.

Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 3, 2019

Hi, @khouloudbelguith,
I took a look at all the files as discussed in this link https://github.com/PrestaShop/PrestaShop/pull/15173/files, all the codes are well updated. As you can see in the screen shots
Classes_Currency_php
Src_Adapter_Currency_CommandHandler_EditCurrencyHandler_php
Src_Adapter_Currency_CurrencyDataProvider_php
Src_Core_Currency_CurrencyDataProviderInterface php
Src_Core_Localization_Currency_Datalayer_CurrencyInstaller_php
what do you think?

Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 4, 2019

@Kis-shoes, during the upgrade, have any errors displayed?
Can you please provide us the log of your upgrade? It can be found in the log.txt file, available in <admin folder>/autoupgrade/tmp/log.txt

Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 4, 2019

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 4, 2019

@Kis-shoes, I couldn't find errors in your log file.
So:

  • Do you use a shop with a multistore context enabled?
  • Do you have multi-currencies?
  • For each store, you have a different currency?
  • Do you have some orders created in different stores?
  • Have you any other information about your shop to help us to reproduce the issue?

Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 4, 2019

Hi @khouloudbelguith,

Do you use a shop with a multistore context enabled? No
Do you have multi-currencies? Yes, Three currencies configured, two activated.
For each store, you have a different currency? No Multistore
Do you have some orders created in different stores? Obviously no.
Have you any other information about your shop to help us to reproduce the issue? I can't think of any other information. I upgraded my shop from PS1.6.19 to PS 1.7.X. Maybe that is all.

Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 4, 2019

@Kis-shoes, in our case, this issue is reproduced with PS1.7.6.0 when multistore is enabled.
Could you please this SQL command on your Database?
Select * from ps_shop
image

Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 4, 2019

Hi @khouloudbelguith,

PS_shop

Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 4, 2019

@Kis-shoes, thanks!
Could be please ru this SQL command also
Select * from ps_currency

Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 4, 2019

@khouloudbelguith,

this is what is in there
ps_currency

Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 4, 2019

@Kis-shoes, thanks!
could you please try with this also
select * from ps_currency_shop

Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 4, 2019

@khouloudbelguith ,

this is it
image

Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 4, 2019

@Kis-shoes, so you just deleted from the BO the currency with id_currecny =1 & id_currecny=2?
Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 4, 2019

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 4, 2019

Hi @Kis-shoes,

Steps: 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. Try to add a cart with amount reduction
  5. Set the status of your orders to Delivered
  6. Set the CHF currency by default
  7. Delete the Euro & Dollar currencies
  8. Go back to the BO => Orders page => an exception displayed
    image

I manage to reproduce the issue with PS1.7.6.1& PS1.7.6.0.
With PS1.7.5.2 => OK.

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!

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 5, 2019

Hi @Kis-shoes,

For a quick fix to your issue, in your BO => International => Localization => Currencies Tab => Add the first three currencies that you deleted before

image

Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 5, 2019

Hi @khouloudbelguith,
Those deleted currencies are Euro and Dollar currencies, which I deleted and recreated again. The third one is Afghan currency, I just added it again as you can see in the red box.
Currencies_BO_
Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 5, 2019

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 5, 2019

Hi @khouloudbelguith,
I took the steps as described in this link https://drive.google.com/file/d/1s2E8mDsK9F_S7ATWbPeywvwFbzmyCEIH/view
I imported again this countries, US, Germany, France and Switzerland
unfortunately that didn't solve the issue.

Debug mode error
In debug mode, this error message also appear when I click on cart tab and refund tab under order.
Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 5, 2019

@Kis-shoes, could you please try to clear cache manually by deleting all the folder into var/cache (prod & dev).
Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 5, 2019

@khouloudbelguith
to delete folders prod and dev in Var/cache or to delete files and folders in prod and dev?
Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 5, 2019

@Kis-shoes, delete prod and dev folders.

Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 5, 2019

@khouloudbelguith ,
I deleted the two folders but nothing changed
Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 5, 2019

@Kis-shoes, same warnings? no exception?

Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 5, 2019

@khouloudbelguith,
Look pretty much similar
Currency specification not found
Debug mode2
Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 5, 2019

@Kis-shoes, I think it is better to wait until this issue fixed by our developers.
It is a major regression, so it will be fixed in a few days.

Thanks!

@Kis-shoes

This comment has been minimized.

Copy link

@Kis-shoes Kis-shoes commented Sep 5, 2019

Hi @khouloudbelguith,

Thanks so much for the support. How long is the update for fix going to take?

Don't you think trying the fresh install could help?

Thanks

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor Author

@khouloudbelguith khouloudbelguith commented Sep 5, 2019

@Kis-shoes, it could be fixed in few days, it is a Major regression.
Also, PrestaShop is an open source project, so it can be solved before if someone submits a pull request to solve it.

New installation could help you but you need to not delete currencies.

Thanks!

@MatShir

This comment has been minimized.

Copy link

@MatShir MatShir commented Sep 18, 2019

@jolelievre, Let's go for ISO and keep the same deleting behaviours as in the other BO's cases for a better UX.

Specs:
If I delete a currency, the CLDR has to hide the currency from the BO in the currency list but it must be kept to display the orders made in the deleted currency.
If no orders have been made with the currency, the currency can be definitely deleted

@jolelievre jolelievre moved this from In progress to To be reviewed in PrestaShop 1.7.6 Sep 23, 2019
@Progi1984 Progi1984 added this to the 1.7.6.2 milestone Oct 8, 2019
@matks matks removed the To Do label Oct 10, 2019
@eternoendless eternoendless moved this from To be reviewed to To be tested in PrestaShop 1.7.6 Oct 14, 2019
@sarahdib sarahdib added the Fixed label Oct 15, 2019
@sarahdib sarahdib moved this from To be tested to To be merged in PrestaShop 1.7.6 Oct 15, 2019
@marionf marionf closed this Oct 15, 2019
PrestaShop 1.7.6 automation moved this from To be merged to Done Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.