Closed Ckaneriya closed 3 years ago
Hi @Ckaneriya. Thank you for your report. To help us process this issue please make sure that you provided the following information:
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
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues 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 issues 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
Have you try update your version php to 7.3+. It's hard to tell exactly problem without see real data Theory v 2.3.6 should work with php7.2
@mrtuvn No, I haven't tried to update the PHP version. I thought 2.3.6 should work with 7.2. Should I change the version?
I'm not sure. Maybe some data related with your category save before not work after upgrade. You can see this repo for reference php version. Try switch your version to 7.3 https://github.com/navarr/magento2-supported-versions
Hi @engcom-Delta. 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: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If 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
branchDetails
- 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.
Hi @Ckaneriya thank you for your report. Do you try to upgrade according docs?
@engcom-Delta Yes, I have upgraded by following the mentioned doc.
I came across the very same error today after installing Magento 2.4.2 on PHP 7.4. Opening Categories page led to this PHP Warning call stack. Disabled any releavant third party modules that were mentioned in the Call stack (Like OP's WeltPixel
) and still produced the same.
Looking at the file in question:
/vendor/magento/module-catalog/Model/Category/DataProvider.php
if ($attribute->usesSource()) {
$source = $attribute->getSource();
$currentCategory = $this->getCurrentCategory();
if ($source instanceof SpecificSourceInterface && $currentCategory) {
$options = $source->getOptionsFor($currentCategory);
} else {
$options = $source->getAllOptions();
}
// Line 434
foreach ($options as &$option) {
$option['__disableTmpl'] = true;
}
$meta[$code]['options'] = $options;
}
It appears $options
is NULL
when debugging - wrapping the foreach( $options as &$options )
with a check (!empty
) passed this error and allowed the categories to load. As this was a fresh Magento install of Community, I only had one category currently in the store - Default category.
Maybe some data in categories or some module integrate with categories cause this. You should recheck that
Hi @engcom-Echo. 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: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If 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
branchDetails
- 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.
Hi @Ckaneriya @MackieeE ,
The issue is not producible based on steps given . Can you please try to test the issue on latest magento branch i.e. 2.4-develop or kindly provide more information regarding the issue so that we can verify the same at our end.
Thanks
Hi @engcom-Hotel. 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: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If 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
branchDetails
- 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.
Hello @Ckaneriya,
We have tried to reproduce the issue, with upgrading Magento from 2.3.1 to 2.3.6, using this devdocs link, but unable to reproduce the issue. Please find below screenshot for reference:
You can try again to upgrade and let us know if you are still facing the issue.
Thanks
Hello @Ckaneriya,
It seems that your issue has been resolved. We are not able to hear from you for the last 14 days so we are closing this issue for now.
If you are still facing the issue you can reopen it.
Thanks
@engcom-Hotel I have checked your last reply. I noticed that you have only one category. That is the default category in your environment. when we had upgraded our environment, we had so many real categories with real data.
I’m almost certain this is happening when:
Both me and OP had third party modules, this I’m sure can’t be replicated from a fresh install & upgrade.
@mackieee Yes, you are right. we have developed one custom module which adds on attribute in all categories and we are indeed having the install script in the custom module. Do you have any solution for this scenario?
i think in this case you can check from your end with custom module for work with magento. I'm not sure this is magento bug or not without module check. You can share your custom module if possible. Without module it's hard to tell exactly problem. Maybe we still need fix from both magento end and custom module too. This issue probably only able reproduce with old store with some data instead clean instance
Preconditions (*)
we have multistore setup
Steps to reproduce (*)
Expected result (*)
Actual result (*)
` 1 exception(s): Exception #0 (Exception): Warning: Invalid argument supplied for foreach() in vendor/magento/module-catalog/Model/Category/DataProvider.php on line 398
` 2. Noticed the same error in `var/log/system.log` and `var/log/debug.log` files We didn't face any issues during the version upgrade. Could this be a PHP version issue? I think the Magento 2.3.6 should work on PHP 7.2, right? Tried to find the solution on StackOverflow but didn't any specific solution or even a workaround.