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

Multistore - It is possible to select a default language for a shop that does not belong to the shop #30171

Closed
2 tasks done
lmeyer1 opened this issue Oct 31, 2022 · 10 comments
Closed
2 tasks done
Labels
1.7.7.8 Affects versions BO Category: Back Office Bug Type: Bug Docker Category: Docker Fixed Resolution: issue closed because fixed Languages Label: Which BO under menu is concerned Multistore Label: Which BO under menu is concerned
Milestone

Comments

@lmeyer1
Copy link
Contributor

lmeyer1 commented Oct 31, 2022

Prerequisites

Describe the bug and add screenshots

  1. It is possible to select a default language for a shop that does not belong to the shop.
    When selecting the wrong language as default language, it is added to the languages for the shop.

  2. On the other hand, it is possible to remove the default language from the shop. The default language setting is not affected.

Expected behavior

  1. It should not be possible to select a language as default language, that is not active in the current shop.

  2. It should not be possible to remove the default language from a shop

Steps to reproduce

Given an environment with more than one language and more than one shop.

Setup

  1. Create a clean installation of PS 1.7.8.7 following this step by step guide
  2. Rename Shop A to French shop
  3. In the BO, select French shop in the dropdown list
  4. Go to International - Localization - Languages
  5. On each language, click on Edit , and make sure, that in shop association only French is associated with French shop. In the shop association for German French shop must not be checked (but at least one other shop must be checked).

Reproduce bug 1)

  1. Open Front Office and notice the URL http://localhost:8017/shop-a
  2. Go to International - Localization - Localization
  3. Look at the option Default language. Notice, that we can change all active languages, even the one that does not belong to French shop.
  4. Select German and click Save
  5. Go to International - Localization - Languages
  6. Click on Edit on German. Notice, that in shop association French shop is now selected
  7. Navigate to the front office, and notice that the URL has changed to http://localhost:8017/shop-a/fr/. It now contains the language. We have inadvertently changed all the URLs. Good by SEO.

Reproduce bug 2)
Currently French shop has both languages French and German, and German is the default language.

  1. Go to International - Localization - Languages
  2. Click on Edit on German's row. Deselect French Shop and save. (This should not be possible, since German is the default language).
  3. In PHPMySQL look at the configuration PS_LANG_DEFAULT for `French Shop. You will find it still pointing to language 2 (German).
  4. Go to International - Localization - Localization. Notice that German is still the default language.

PrestaShop version(s) where the bug happened

1.7.8.7

PHP version(s) where the bug happened

7.4

If your bug is related to a module, specify its name and its version

No response

@lmeyer1 lmeyer1 added Bug Type: Bug New New issue not yet processed by QA labels Oct 31, 2022
@florine2623
Copy link
Contributor

Hello @lmeyer1

For the bug 1), I have reproduced the issue only in BO
In my case, the language for my second shop should be FR instead of EN, is that right ?

Screen.Recording.2022-10-31.at.15.30.31.mov

In FO, the languages are the correct one for each shop.
ShopA: English
Screenshot 2022-10-31 at 15 36 23

ShopB: French
Screenshot 2022-10-31 at 15 36 27

For the bug 2), I'm not sure I understand well what I'm supposed to do.
I've tried disabling the language, it is not possible:
Screenshot 2022-10-31 at 15 41 42

I've tried to deselect the language for a specific shop and I have a warning:
Screenshot 2022-10-31 at 15 40 07

Could you send a screen record of your case please ?

Waiting for your feedback!
Thanks!

@florine2623 florine2623 added BO Category: Back Office NMI Status: issue needs more information Multistore Label: Which BO under menu is concerned Languages Label: Which BO under menu is concerned 1.7.8.7 Affects versions Waiting for author Status: action required, waiting for author feedback and removed New New issue not yet processed by QA labels Oct 31, 2022
@florine2623 florine2623 changed the title It is possible to select a default language for a shop that does not belong to the shop Multistore - It is possible to select a default language for a shop that does not belong to the shop Oct 31, 2022
@lmeyer1
Copy link
Contributor Author

lmeyer1 commented Oct 31, 2022

@florine2623

I've tried disabling the language, it is not possible:

This is what I expected. I don't know why I didn't get that error. I'm installing a clean PrestaShop using Docker, the I will be able to test these bugs in a neutral reproductible environment and not on my production server.

@prestashop-issue-bot prestashop-issue-bot bot removed the Waiting for author Status: action required, waiting for author feedback label Oct 31, 2022
@florine2623 florine2623 added the Docker Category: Docker label Oct 31, 2022
@florine2623
Copy link
Contributor

@PrestaShop/qa-functional ,

Could someone with Docker env try to reproduce this issue ? 🙏
Thanks!

@lmeyer1
Copy link
Contributor Author

lmeyer1 commented Oct 31, 2022

Hello @florine2623

  1. I now updated the bug report above with a step by step guide starting at zero (i.e. clean installation).
  2. I replaced all A and B with French and German to be very explicit

I know why you got the error
199034949-23a2aeee-235b-4ce8-981a-d0bafa5c25d0

It is not related to the default shop, but it shows up, because Prestashop requires that at least one shop is checked. This why I added in the Setup, point 5:

In the shop association for German French shop must not be checked (but at least one other shop must be checked).

With this additional detail, you should be able to reproduce the issue without recurring to docker.

@HanaRebaiQA
Copy link

Hello @lmeyer1

Thanks for your report.
It seems that your issue is similar to this one #27617 which is fixed in this PR on the next PS1788 release.

Could you please confirm it?

Thank You!

@HanaRebaiQA HanaRebaiQA added the Waiting for author Status: action required, waiting for author feedback label Nov 2, 2022
@lmeyer1
Copy link
Contributor Author

lmeyer1 commented Nov 2, 2022

@HanaRebaiQA

No #27617 is not related with this issue. #27617 is about employee language and display in the BO.
This issue here is about the configuration of the language displayed in the Front Office.

@prestashop-issue-bot prestashop-issue-bot bot removed the Waiting for author Status: action required, waiting for author feedback label Nov 2, 2022
@HanaRebaiQA
Copy link

Hello @lmeyer1

Thanks for your feedback.
I tried to reproduce you issue on PS1787, but I did not reproduce step 6 in Reproduce bug 1. But, when I checked in FO with french shop, which is associated to French language, the FO is in English

30171.mp4

What do you think?

Thank You!

@HanaRebaiQA HanaRebaiQA added the Waiting for author Status: action required, waiting for author feedback label Nov 2, 2022
@lmeyer1
Copy link
Contributor Author

lmeyer1 commented Nov 2, 2022

Hello Hana,
It was difficult for me to follow your screen cast. So I'm not sure where things went wrong.
You say:

But, when I checked in FO with french shop, which is associated to French language, the FO is in English

IMHO, This is enough to show that there is a bug. The French shop must display French only.

@prestashop-issue-bot prestashop-issue-bot bot removed the Waiting for author Status: action required, waiting for author feedback label Nov 2, 2022
@HanaRebaiQA
Copy link

Hello @lmeyer1

Thanks for your feedback.
I have checked the same issue that I have communicated with PS1778 and i was able to reproduce it.
But, i was unable to reproduce the issue with 8.0.0 version.

It may be fixed on 8.0.0.

PS1778 : NOK

1778.7.mp4

PS1787 : NOK

199459833-07afc8a6-5fca-412b-b5cc-f7721907b3d8.mp4

PS8.0.0 : OK ✔️

8.0.0.mp4

Could you please check again?

Thank You!

@HanaRebaiQA HanaRebaiQA added the Waiting for author Status: action required, waiting for author feedback label Nov 2, 2022
@hibatallahAouadni
Copy link
Contributor

hibatallahAouadni commented Nov 22, 2022

Hello @lmeyer1

Closing the issue as it's not reproducible on 8.0.0 🎉

Thanks!

@prestashop-issue-bot prestashop-issue-bot bot removed the Waiting for author Status: action required, waiting for author feedback label Nov 22, 2022
@hibatallahAouadni hibatallahAouadni removed the NMI Status: issue needs more information label Nov 22, 2022
@hibatallahAouadni hibatallahAouadni added Invalid Resolution: issue closed because invalid Fixed Resolution: issue closed because fixed 1.7.7.8 Affects versions and removed Invalid Resolution: issue closed because invalid 1.7.8.7 Affects versions labels Nov 22, 2022
@hibatallahAouadni hibatallahAouadni added this to the 8.0.0 milestone Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.7.8 Affects versions BO Category: Back Office Bug Type: Bug Docker Category: Docker Fixed Resolution: issue closed because fixed Languages Label: Which BO under menu is concerned Multistore Label: Which BO under menu is concerned
Projects
None yet
Development

No branches or pull requests

4 participants