-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 #10764: delete url rewrites for products after an attribute set is deleted #11391
Fix #10764: delete url rewrites for products after an attribute set is deleted #11391
Conversation
* Time: 22:12 | ||
*/ | ||
|
||
namespace Magento\CatalogUrlRewrite\Plugin\Eav\Model; |
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.
Please fix the namespace. Here is the test result:
Passed: 24399, Failed: 1, Incomplete: 0, Skipped: 0.
Data set: /opt/bamboo/bamboo-agent-home/xml-data/build-dir/MCCE22-AT398-INSE/magento2ce/app/code/Magento/CatalogUrlRewrite/Plugin/Eav/Model/AttributeSetRepository.php
Incorrect namespace usage(s) found in file /opt/bamboo/bamboo-agent-home/xml-data/build-dir/MCCE22-AT398-INSE/magento2ce/app/code/Magento/CatalogUrlRewrite/Plugin/Eav/Model/AttributeSetRepository.php:
CouldNotDeleteException
/opt/bamboo/bamboo-agent-home/xml-data/build-dir/MCCE22-AT398-INSE/magento2ce/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php:598
/opt/bamboo/bamboo-agent-home/xml-data/build-dir/MCCE22-AT398-INSE/magento2ce/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php:371
/opt/bamboo/bamboo-agent-home/xml-data/build-dir/MCCE22-AT398-INSE/magento2ce/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php:56
/opt/bamboo/bamboo-agent-home/xml-data/build-dir/MCCE22-AT398-INSE/magento2ce/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php:373
/opt/bamboo/bamboo-agent-home/xml-data/build-dir/MCCE22-AT398-INSE/magento2ce/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php:115
/opt/bamboo/bamboo-agent-home/xml-data/build-dir/MCCE22-AT398-INSE/magento2ce/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php:70
/opt/bamboo/bamboo-agent-home/xml-data/build-dir/MCCE22-AT398-INSE/magento2ce/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php:373```
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.
I'm not quite sure what the namespace is supposed to be if not Magento\CatalogUrlRewrite\Plugin\Eav\Model
. I've copied the namespace structure from other plugins, for example Magento\Catalog\Plugin\Model\ResourceModel
.
callable $proceed, | ||
AttributeSetInterface $attributeSet | ||
) { | ||
if (!isset($subject) || !$attributeSet->getAttributeSetId()) |
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.
please fix the coding style
Magento\Test\Php\LiveCodeTest::testCodeStyle
PHP Code Sniffer detected 2 violation(s):
FILE: ...to/CatalogUrlRewrite/Plugin/Eav/Model/AttributeSetRepository.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
50 | ERROR | [x] Expected 1 space after closing parenthesis; found 9
----------------------------------------------------------------------
@patrikpihlstrom please make needed changes in order to accept the PR |
[EngCom] Partners Pull Requests
Public Pull Requests #12136 update button.phtml overcomplicated translation phrase. 2.2 by @ChuckyK #12061 Cleanup for object manager references and depricated method by @atishgoswami #11968 Fix bug: Customer import deletes exiting customer entity Fields by @jalogut #11459 close #10810 Migrates Apache Access Syntax to 2.4 on Apache >= 2.4 by @jonashrem Fixed Public Issues #10810 Add support of apache2.4 commands in htaccess
…stomer Dashboard by default #11876
Public Pull Requests #11876 After logging in customer is now not redirecting to Customer Dashboard by default by @p-bystritsky Fixed Public Issues #10834 signing in after selecting checkout button, will not end up to checkout page!
…4-release-notification-content-update
… - spike - Merge branch '2.2-develop' into bugfixes
…ento-engcom/magento2ce into 2.2-develop-prs
[EngCom] Public Pull Requests - 2.2-develop - MAGETWO-83552: save invoice ID on credit memo when using API method salesRefundInvoiceV1 #11670 - MAGETWO-82577: [Backport 2.2] Translate order getCreatedAtFormatted() to store locale #11422 - MAGETWO-84474: 10128: New Orders not being saved to order grid #12241 - MAGETWO-83783: Shipping method fixtures not compatible with getShippingMethod(true) in OrderCreateTest #12227 - MAGETWO-83290: Add swatch option: Prevent loosing data and default value if data is not populated via adminhtml #12036 - MAGETWO-83741: 11740: Sending emails from Admin in Multi-Store Environment defaults to Primary Store #11992 - MAGETWO-83399: Fix for remove 'product_list_toolbar' block from layout in XML #9413 #11473
…invoice_set_template_vars_before Event (backport MAGETWO-69482 to 2.2) #12132
Public Pull Requests #1770 9515: South Korea Zip Code Validation incorrect by @RomaKis #12132 10210: Transport variable can not be altered in email_invoice_set_template_vars_before Event (backport MAGETWO-69482 to 2.2) by @RomaKis Fixed Public Issues #9515 South Korea Zip Code Validation incorrect #10210 Transport variable can not be altered in email_invoice_set_template_vars_before Event
…1-magento-magento2-12133
…acters cannot be stored using UTF8) #12253
…coded properly in admin attribute option input fields #12133
Public Pull Requests #12328 9742: Default welcome message returns after being deleted #9742 by @RomaKis #12253 New validation: 3bytes characters filter (4 bytes characters cannot be stored using UTF8) by @KarlDeux #12133 Fix for issue 12127: Single quotation marks are now decoded properly in admin attribute option input fields by @erfanimani #11389 Attribute category_ids issue by @manuelson Fixed Public Issues #9742 Default welcome message returns after being deleted #12058 Can't save emoji in custom product options #12127 Apostrophe in attribute option value in admin is not handled properly #11341 Attribute category_ids issue
|
Described issue resolved in #12167 |
Description
Adds an interceptor around the delete function of
\Magento\Eav\Model\AttributeSetRepository
in order to capture the relevant product ids, and then remove the old url rewrites after the attribute set has been deleted.Fixed Issues (if relevant)
Manual testing scenarios