Skip to content

[Issue] Fix URL generation for new store when it created with setup:config:import #30025

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #30023: Fix URL generation for new store when it created with setup:config:import


Preconditions (*)

Magento 2.4-develop

Emulate adminhtml area where url rewrites are created

Related Pull Requests

Fixed Issues (if relevant)

  1. N/A

Steps to reproduce: (*)

  1. On Dev. env setup only one store view with few categories and products
  2. dump stores info to config.php with php bin/magento app:config:dump and commit it

Screenshot from 2020-10-09 11-37-34

  1. Deploy to production (run php bin/magento setup:upgrade --keep-generated on production env)
  2. On dev. env create second store view in the same Store Group and Website in config.php file

2020-10-09_11-39

  1. Deploy to production (run php bin/magento setup:upgrade --keep-generated on production env)
  2. Go to Admin- > Marketing -> URL Rewrites;

Actual Result: ✖️ On second store view URL rewrites were generated only on dev env (it was created via admin), but they weren't generated on production env.

Screenshot from 2020-10-09 10-25-12

Expected Result: ✔️ On second store view on dev and production environments were generated URL rewrites for categories and products.

Questions or comments

My investigation shown that only in adminhtml area URL rewrites are generated when store view is created:

<type name="Magento\Store\Model\ResourceModel\Store">
<plugin name="store_plugin" type="Magento\CatalogUrlRewrite\Model\Category\Plugin\Store\View"/>
</type>
<type name="Magento\Store\Model\ResourceModel\Group">
<plugin name="group_plugin" type="Magento\CatalogUrlRewrite\Model\Category\Plugin\Store\Group"/>
</type>

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)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

Labels

Component: DeployFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P3May be fixed according to the position in the backlog.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions