-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Fix #39770 The store that was requested wasn't found #39771
Conversation
Fix case: Magento\Store\Model\StoreRepository->get($code = 'graphql')
Hi @coresh. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core_config_data:
select * from core_config_data where path='web/url/use_store';
+-----------+---------+----------+-------------------+-------+---------------------+
| config_id | scope | scope_id | path | value | updated_at |
+-----------+---------+----------+-------------------+-------+---------------------+
| 523 | default | 0 | web/url/use_store | 1 | 2024-08-29 20:49:29 |
+-----------+---------+----------+-------------------+-------+---------------------+
For the method:
public function getValidStoreCode(Http $request, string $pathInfo = '') : ?strin
Appended additional verification for the case:
$storeCode === Area::AREA_GRAPHQL
The reason:
To exclude the NoSuchEntityException:
Magento\Framework\Exception\NoSuchEntityException: The store that was requested wasn't found. Verify the store and try again. in vendor/magento/module-store/Model/StoreRepository.php on line 75
Call Stack:
0.0001 507288 1. {main}() pub/index.php:0
0.0110 2907496 2. Magento\Framework\App\Bootstrap->run($application = class Magento\Framework\App\Http { ... }) pub/index.php:35
0.0111 2919104 3. Magento\Framework\App\Http->launch() vendor/magento/framework/App/Bootstrap.php:264
0.0111 2919104 4. Magento\Framework\App\Request\Http->getFrontName() vendor/magento/framework/App/Http.php:111
0.0111 2919104 5. Magento\Framework\App\Request\Http->getPathInfo() vendor/magento/framework/App/Request/Http.php:219
0.0111 2919104 6. Magento\Framework\App\Request\Http->getOriginalPathInfo() vendor/magento/framework/App/Request/Http.php:169
0.0111 2919144 7. Magento\Backend\App\Request\PathInfoProcessor\Proxy->process($request = class Magento\Framework\App\Request\Http { ... }, $pathInfo = '/graphql') vendor/magento/framework/App/Request/Http.php:154
0.0121 2927000 8. Magento\Backend\App\Request\PathInfoProcessor->process($request = class Magento\Framework\App\Request\Http { ... }, $pathInfo = '/graphql') generated/code/Magento/Backend/App/Request/PathInfoProcessor/Proxy.php:105
0.0140 3653080 9. Magento\Store\App\Request\PathInfoProcessor->process($request = class Magento\Framework\App\Request\Http { ... }, $pathInfo = '/graphql') vendor/magento/module-backend/App/Request/PathInfoProcessor.php:55
0.0140 3653080 10. Magento\Store\App\Request\StorePathInfoValidator->getValidStoreCode($request = class Magento\Framework\App\Request\Http { ... }, $pathInfo = '/graphql') vendor/magento/module-store/App/Request/PathInfoProcessor.php:42
0.0143 3818928 11. Magento\Store\Model\StoreRepository->getActiveStoreByCode($code = 'graphql') vendor/magento/module-store/App/Request/StorePathInfoValidator.php:99
0.0143 3818928 12. Magento\Store\Model\StoreRepository->get($code = 'graphql') vendor/magento/module-store/Model/StoreRepository.php:89
PR Close reason - re-opened: PR-39771 |
Fix the case - when $storeCode === Area::AREA_GRAPHQL
The issue provided by the request:
The above request is part of the magento pwa-studio requests.
The request executing e.g. during opening the home page.
Affected to the Case:
Store::XML_PATH_STORE_IN_URL
Core config data value for the path: 'web/url/use_store' === 1
Description (*)
The fix appended additional verification for the case:
$storeCode === Area::AREA_GRAPHQL
To the method:
Related Commit:
Merge branch 'ACP2E-3447' into PR-11-14-2024
Fixed Issue
Manual testing scenarios (*)
Questions or comments
But, the second part the issue related to the "infinite loop" still exists.
Contribution checklist (*)