-
Notifications
You must be signed in to change notification settings - Fork 9.4k
magento/magento2#12405: Impossible to create a new storeview #13943
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
magento/magento2#12405: Impossible to create a new storeview #13943
Conversation
- Magento_Config should depend on Magento_Store
Hi @hostep I will try to get some more information on the best way to do this for you. If you look at say the customer module it requires a specific store module version in the composer.json but the module xml does not set the sequence. |
Ok thanks. My question is if we fix this issue by adding the module in the sequence, if this is the correct fix, or if this will only hide the real problem? |
Hi @hostep so looking into the debugging of the issue. I can see that there seems to be two deprecated sections of the code being called in the flow. The first is in the The second is in the In both cases I am not actually sure if making these changes would actually fix this problem or would we still have the same problem but now with refactored code. Did you have any experience with these parts in the code base? |
Thanks @dmanners for the further investigation! (I really need to start learning how to use PhpStorm properly, but I love Sublime so much :p) Anyways, I also don't know if those two deprecated method calls cause this problem, I doubt it, but no experience there I'm afraid. My guess is that by changing the sequence of the module load order, that certain functionality is executed in a slightly different order then otherwise, but I don't know which functionality that could be or how to try to debug this somehow... |
Hi @hostep looking into other modules with similar issues I feel that this is an acceptable solution. Thanks for this PR. |
Ok excellent, thanks @dmanners! |
I quickly tested this on the One interesting thing is that this problem throws a different error on
|
@hostep Does anything in this topic need to be changed as a result of your PR? https://devdocs.magento.com/guides/v2.2/extension-dev-guide/build/module-load-order.html |
@keharper: I don't think so. Looks pretty good, but I'm no expert for those things. But honestly, I have not idea why this change was necessary. Someone should do a deep dive in the code to figure out why the order of execution caused this problem, because this PR is probably only hiding a deeper problem. |
Description
This is a retake of #12407, but with only a single dependency added.
I'm still not exactly sure if this is the right way to solve this, but nobody seems to give feedback in the original issue, so I'm trying it again with a PR.
Fixed Issues (if relevant)
Manual testing scenarios
app/etc/config.php
and move the line'Magento_Config' => 1,
higher up the list then'Magento_Store' => 1,
(normally you shouldn't do this manually, but installing certain 3rd party modules give the same as a result)Requested store is not found
is shown and no storeview is added.By defining
Magento_Store
as a dependency ofMagento_Config
we make sure that this sort order of modules outlined in step 2 can never happen.Contribution checklist