Skip to content

Conversation

peterjaap
Copy link
Contributor

@peterjaap peterjaap commented Nov 3, 2022

Description (*)

We have a store in single store mode. When we do setup:install, the config option web/url/use_store is enabled, which causes the store code to appear in the URL, even though there is only one storeview. This change makes sure the storecode does not appear in the URL when a store is in single store mode.

Manual testing scenarios (*)

  1. Set a store with one store view in Single Store Mode (bin/magento config:set general/single_store_mode/enabled 1) and enable store codes (bin/magento config:set web/url/use_store 1)
  2. Visit the homepage
  3. You can see the store code in the URL
  4. Apply this patch
  5. Visit the homepage
  6. Store code is not there

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Do not use store code in URLs when site is in single store mode #36831: Do not use store code in URLs when site is in single store mode

@m2-assistant
Copy link

m2-assistant bot commented Nov 3, 2022

Hi @peterjaap. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-github-services m2-github-services added partners-contribution Pull Request is created by Magento Partner Partner: Elgentos labels Nov 3, 2022
@sdzhepa sdzhepa added the Priority: P3 May be fixed according to the position in the backlog. label Nov 3, 2022
@sinhaparul sinhaparul added the Project: Community Picked PRs upvoted by the community label Dec 12, 2022
@andrewbess
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

Copy link
Contributor

@andrewbess andrewbess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @peterjaap
Thank you for your contribution
Could you please fix tests
Thank you in advance.

@peterjaap
Copy link
Contributor Author

@andrewbess failing tests are unrelated to this change.

@andrewbess
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@andrewbess
Copy link
Contributor

andrewbess commented Jan 6, 2023

Hello @peterjaap

@andrewbess failing tests are unrelated to this change.

Perhaps integration tests failed due to your changes.
Please check again.
Thank you in advance.

@peterjaap
Copy link
Contributor Author

@andrewbess
Copy link
Contributor

@andrewbess I'd like to fix the test however it doesn't say which test it is that fails; https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/36414/a7d89a27426ba404946195eef3c612c7/Integration/allure-report-ce/index.html#categories/605f6677ce1fac53542d2dad127029aa/db44db41d1327373/

Hello @peterjaap
Please check Magento\Store\Model\StoreTest::testIsUseStoreInUrl
Thank you in advance.

@peterjaap
Copy link
Contributor Author

@andrewbess thanks, I updated the test

@peterjaap
Copy link
Contributor Author

So everything's done and now we're waiting for someone to merge it?

@engcom-Lima engcom-Lima self-assigned this Feb 9, 2023
@engcom-Lima
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Lima
Copy link
Contributor

@magento create issue

@engcom-Lima
Copy link
Contributor

@magento give me test instance

@magento-deployment-service
Copy link

Hi @engcom-Lima. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@engcom-Lima
Copy link
Contributor

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop

Manual testing scenario:

  1. Set a store with one store view in Single Store Mode (bin/magento config:set general/single_store_mode/enabled 1) and enable store codes (bin/magento config:set web/url/use_store 1)
  2. Visit the homepage
  3. You can see the store code in the URL
  4. Apply this patch
  5. Visit the homepage
  6. Store code is not there

Before: ✖️ Store code was visible.

Screenshot 2023-02-09 at 5 04 08 PM

Screenshot 2023-02-09 at 5 06 25 PM

After: ✔️ Now, store code is not visible.

Screenshot 2023-02-09 at 6 39 01 PM

Addtionally tested:

  1. Created customer.
  2. Placed order from customer.
  3. Added product to the wishlist.
  4. Placed order from guest.
  5. Invoiced,shipped & credit memo.

No additional manual testing is required as a part of regression.
Builds are failed hence, moving this PR to extended testing.

@engcom-Delta
Copy link
Contributor

@magento run Functional Tests CE, Unit Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

3 similar comments
@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Echo
Copy link
Contributor

engcom-Echo commented Feb 10, 2023

Failing Functional Tests CE is related to currency converter.
image
As api is down hence moving to Merge In Progress

@peterjaap
Copy link
Contributor Author

Woop, apparently this change is now available in 2.4.6 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Elgentos partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: accept Project: Community Picked PRs upvoted by the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Do not use store code in URLs when site is in single store mode