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

Error when creating a store view if there are CMS pages with the same URL key #28357

Closed
1 task
stupachenko opened this issue May 25, 2020 · 9 comments · Fixed by #28421
Closed
1 task

Error when creating a store view if there are CMS pages with the same URL key #28357

stupachenko opened this issue May 25, 2020 · 9 comments · Fixed by #28421
Assignees
Labels
Component: Store Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Done Has been reviewed and prioritized during Triage with Product Managers

Comments

@stupachenko
Copy link

stupachenko commented May 25, 2020

Preconditions (*)

  1. Magento 2.4-develop

Steps to reproduce (*)

  1. Navigate to Admin Panel > Stores > All Stores and create 2 store views:
Name: German
Code: german
Status: Enabled
Name: French
Code: french
Status: Enabled
  1. Navigate to Admin Panel > Content > Pages and create 2 pages:
Page Title: About Us
URL Key: about-us
Store View: French
Page Title: About Us
URL Key: about-us
Store View: German
  1. Navigate to Admin Panel > Stores > All Stores and create store view
Name: Spanish
Code: spanish
Status: Enabled

Expected result (*)

  1. Store view created successfully.

Actual result (*)

  1. Error message "Something went wrong while saving. Please review the error log."
[2020-05-25 10:46:30] main.CRITICAL: Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'about-us-4' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT  INTO `url_rewrite` (`redirect_type`,`is_autogenerated`,`metadata`,`description`,`store_id`,`entity_type`,`entity_id`,`request_path`,`target_path`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?)
Trace: <pre>#1 Magento\Framework\DB\Adapter\Pdo\Mysql->query() called at [generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php:128]
#2 Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->query() called at [lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php:2105]
#3 Magento\Framework\DB\Adapter\Pdo\Mysql->insertArray() called at [generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php:557]
#4 Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->insertArray() called at [lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php:2062]
#5 Magento\Framework\DB\Adapter\Pdo\Mysql->insertMultiple() called at [generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php:544]
#6 Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->insertMultiple() called at [app/code/Magento/UrlRewrite/Model/Storage/DbStorage.php:337]
#7 Magento\UrlRewrite\Model\Storage\DbStorage->insertMultiple() called at [app/code/Magento/UrlRewrite/Model/Storage/DbStorage.php:287]
#8 Magento\UrlRewrite\Model\Storage\DbStorage->doReplace() called at [app/code/Magento/UrlRewrite/Model/Storage/AbstractStorage.php:87]
#9 Magento\UrlRewrite\Model\Storage\AbstractStorage->replace() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:58]
#10 Magento\UrlRewrite\Model\Storage\DbStorage\Interceptor->___callParent() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:138]
#11 Magento\UrlRewrite\Model\Storage\DbStorage\Interceptor->Magento\Framework\Interception\{closure}() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:153]
#12 Magento\UrlRewrite\Model\Storage\DbStorage\Interceptor->___callPlugins() called at [generated/code/Magento/UrlRewrite/Model/Storage/DbStorage/Interceptor.php:65]
#13 Magento\UrlRewrite\Model\Storage\DbStorage\Interceptor->replace() called at [app/code/Magento/CmsUrlRewrite/Plugin/Cms/Model/Store/View.php:77]
#14 Magento\CmsUrlRewrite\Plugin\Cms\Model\Store\View->afterSave() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:146]
#15 Magento\Store\Model\ResourceModel\Store\Interceptor->Magento\Framework\Interception\{closure}() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:153]
#16 Magento\Store\Model\ResourceModel\Store\Interceptor->___callPlugins() called at [generated/code/Magento/Store/Model/ResourceModel/Store/Interceptor.php:117]
#17 Magento\Store\Model\ResourceModel\Store\Interceptor->save() called at [lib/internal/Magento/Framework/Model/AbstractModel.php:654]
#18 Magento\Framework\Model\AbstractModel->save() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:58]
#19 Magento\Store\Model\Store\Interceptor->___callParent() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:138]
#20 Magento\Store\Model\Store\Interceptor->Magento\Framework\Interception\{closure}() called at [app/code/Magento/Theme/Model/Indexer/Design/Config/Plugin/Store.php:39]
#21 Magento\Theme\Model\Indexer\Design\Config\Plugin\Store->aroundSave() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:135]
#22 Magento\Store\Model\Store\Interceptor->Magento\Framework\Interception\{closure}() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:153]
#23 Magento\Store\Model\Store\Interceptor->___callPlugins() called at [generated/code/Magento/Store/Model/Store/Interceptor.php:1040]
#24 Magento\Store\Model\Store\Interceptor->save() called at [app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php:72]
#25 Magento\Backend\Controller\Adminhtml\System\Store\Save->processStoreSave() called at [app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php:130]
#26 Magento\Backend\Controller\Adminhtml\System\Store\Save->execute() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:58]
#27 Magento\Backend\Controller\Adminhtml\System\Store\Save\Interceptor->___callParent() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:138]
#28 Magento\Backend\Controller\Adminhtml\System\Store\Save\Interceptor->Magento\Framework\Interception\{closure}() called at [lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php:51]
#29 Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin->aroundExecute() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:135]
#30 Magento\Backend\Controller\Adminhtml\System\Store\Save\Interceptor->Magento\Framework\Interception\{closure}() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:153]
#31 Magento\Backend\Controller\Adminhtml\System\Store\Save\Interceptor->___callPlugins() called at [generated/code/Magento/Backend/Controller/Adminhtml/System/Store/Save/Interceptor.php:26]
#32 Magento\Backend\Controller\Adminhtml\System\Store\Save\Interceptor->execute() called at [lib/internal/Magento/Framework/App/Action/Action.php:110]
#33 Magento\Framework\App\Action\Action->dispatch() called at [app/code/Magento/Backend/App/AbstractAction.php:150]
#34 Magento\Backend\App\AbstractAction->dispatch() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:58]
#35 Magento\Backend\Controller\Adminhtml\System\Store\Save\Interceptor->___callParent() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:138]
#36 Magento\Backend\Controller\Adminhtml\System\Store\Save\Interceptor->Magento\Framework\Interception\{closure}() called at [app/code/Magento/Backend/App/Action/Plugin/Authentication.php:143]
#37 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:135]
#38 Magento\Backend\Controller\Adminhtml\System\Store\Save\Interceptor->Magento\Framework\Interception\{closure}() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:153]
#39 Magento\Backend\Controller\Adminhtml\System\Store\Save\Interceptor->___callPlugins() called at [generated/code/Magento/Backend/Controller/Adminhtml/System/Store/Save/Interceptor.php:39]
#40 Magento\Backend\Controller\Adminhtml\System\Store\Save\Interceptor->dispatch() called at [lib/internal/Magento/Framework/App/FrontController.php:186]
#41 Magento\Framework\App\FrontController->processRequest() called at [lib/internal/Magento/Framework/App/FrontController.php:118]
#42 Magento\Framework\App\FrontController->dispatch() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:58]
#43 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:138]
#44 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [lib/internal/Magento/Framework/Interception/Interceptor.php:153]
#45 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#46 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [lib/internal/Magento/Framework/App/Http.php:116]
#47 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#48 Magento\Framework\App\Http\Interceptor->launch() called at [lib/internal/Magento/Framework/App/Bootstrap.php:260]
#49 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:40]
</pre> [] []

Additional Information


  • Severity: S2
@m2-assistant
Copy link

m2-assistant bot commented May 25, 2020

Hi @stupachenko. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label May 25, 2020
@swathishs swathishs self-assigned this May 26, 2020
@m2-assistant
Copy link

m2-assistant bot commented May 26, 2020

Hi @swathishs. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@swathishs
Copy link

@magento give me 2.4-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @swathishs. Thank you for your request. I'm working on Magento 2.4-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @swathishs, here is your Magento instance.
Admin access: https://i-28357-2-4-develop.instances.magento-community.engineering/admin_461c
Login: 919b85fe Password: 80634986853c
Instance will be terminated in up to 3 hours.

@swathishs
Copy link

The issue is been reproduced on the 2.4-develop branch
Please find the attachment below:

  1. Two store view:
    image

  2. Two Pages:
    image

  3. Creating third store view (Error):
    image

@swathishs swathishs added Component: Store Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels May 26, 2020
@ghost ghost unassigned swathishs May 26, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @swathishs
Thank you for verifying the issue. Based on the provided information internal tickets MC-34637 were created

Issue Available: @swathishs, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label May 26, 2020
@engcom-Charlie engcom-Charlie self-assigned this May 27, 2020
@m2-assistant
Copy link

m2-assistant bot commented May 27, 2020

Hi @engcom-Charlie. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

    1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

@ihor-sviziev ihor-sviziev added the Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. label Jun 1, 2020
@sdzhepa sdzhepa added Triage: Ready for Triage Issue is ready to me triaged with Product Manager Priority: P3 May be fixed according to the position in the backlog. Triage: Done Has been reviewed and prioritized during Triage with Product Managers and removed Triage: Ready for Triage Issue is ready to me triaged with Product Manager labels Jun 1, 2020
@magento-engcom-team
Copy link
Contributor

Hi @stupachenko. Thank you for your report.
The issue has been fixed in #28421 by @engcom-Charlie in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Store Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Done Has been reviewed and prioritized during Triage with Product Managers
Projects
Archived in project
6 participants