magento2
magento2 copied to clipboard
#33935 fixed issue with Call to undefined method getLinkField
Description (*)
This PR fixes error reported in the #33935
Related Pull Requests
Fixed Issues (if relevant)
Fix for https://github.com/magento/magento2/issues/33935
Manual testing scenarios (*)
- Admin - Stores - Configuration - Catalog - Catalog - Set "Use Flat Catalog Product" to Yes and Save
- Reindex and Clear cache
- Front-end - Open any Bundle Product - No errors on UI
Questions or comments
Contribution checklist (*)
- [x] Pull request has a meaningful description of its purpose
- [x] 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)
Hi @paveldedovetsewave. 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
:exclamation: 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:
-
Database Compare
-
Functional Tests CE
-
Functional Tests EE
, -
Functional Tests B2B
-
Integration Tests
-
Magento Health Index
-
Sample Data Tests CE
-
Sample Data Tests EE
-
Sample Data Tests B2B
-
Static Tests
-
Unit Tests
-
WebAPI Tests
-
Semantic Version Checker
You can find more information about the builds here
:information_source: Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.
For more details, please, review the Magento Contributor Guide documentation.
:warning: According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento give me test instance
Hi @paveldedovetsewave. Thank you for your request. I'm working on Magento instance for you.
Hi @paveldedovetsewave, here is your Magento Instance: https://6c82b0ea0297f632a5c808d9b4cce76f.instances.magento-community.engineering Admin access: https://6c82b0ea0297f632a5c808d9b4cce76f.instances.magento-community.engineering/admin_543e Login: 52af09bc Password: 0cdba1405603
@magento run all tests
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 run all tests
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 run Functional Tests B2B, Static Tests
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.
@paveldedovetsewave - You need to sign the Adobe CLA as well
@BarnyShergold the previous solultion with $selectionsCollection->exportToArray() was incorrect and caused call method getLinkField from the collection which doesn't have such method. I've changed original method with using another purpose for getting data ($selection->getData('is_default') instead of $selection['is_default'])
@magento run all tests
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 run Functional Tests B2B
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.
@DedovetsPavel - The UnitTests are now failing as the method you changed has 7 levels of nesting! Perhaps refactor first section to be -
$typeInstance = $product->getTypeInstance();
$typeInstance->setStoreFilter($product->getStoreId(), $product);
if ($product->getTypeId() === BundleType::TYPE_BUNDLE &&
$typeInstance->hasRequiredOptions($product)) {
Or perhaps extract lines 43 - 52 and make a private method? getIsNoCustomizations ?
@magento run all tests
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 run all tests
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 run Static Tests,Integration Tests,Functional Tests CE,Functional Tests B2B
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 run Static Tests,Functional Tests B2B
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.
Hi @BarnyShergold, thank you for the review. ENGCOM-9241 has been created to process this Pull Request :eight_spoked_asterisk: @BarnyShergold, could you please add one of the following labels to the Pull Request?
Label | Description |
---|---|
Auto-Tests: Covered |
All changes in Pull Request is covered by auto-tests |
Auto-Tests: Not Covered |
Changes in Pull Request requires coverage by auto-tests |
Auto-Tests: Not Required |
Changes in Pull Request does not require coverage by auto-tests |
@paveldedovetsewave thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.
@magento run all tests
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
Hi @paveldedovetsewave ,
Thanks for the collaboration & contribution!
### :x: QA not Passed
Bundle Product not working with "Use Flat Catalog Product"=Yes
Manual Scenario Steps
- Admin - Stores - Configuration - Catalog - Catalog - Set "Use Flat Catalog Product" to Yes and Save
- Reindex and Clear cache
- Front-end - Open any Bundle Product - Issue: Below error message is displayed on UI
:heavy_check_mark: Expected result After Fix
No Exception on UI
:x: Actual result After Fix