Closed brian-ebizmarts closed 3 years ago
Thanks for opening this issue!
Hi @brian-ebizmarts. 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.
@brian-ebizmarts do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Thanks for opening this issue!
@magento give me 2.4-develop instance
Hi @gauravagarwal1001. Thank you for your request. I'm working on Magento 2.4-develop instance for you
Hi @gauravagarwal1001, here is your Magento instance.
Admin access: https://i-26732-2-4-develop.instances.magento-community.engineering/admin_e554
Login: 5c1a94c8
Password: 01f7f3143cb0
Instance will be terminated in up to 3 hours.
Hi @shikhamis11. 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 @brian-ebizmarts I checked this issue is not reproducible at 2.4-develop instance .. let me know if it requires any additional steps to reproduce this issue .. also please share video or screenshots if you are able to reproduce this issue .
Hi @shikhamis11, here is a video in Magento EE 2.3.2 instance: https://drive.google.com/file/d/1UUa1HlARvJ83NOH1FgLY_AlcsMZ3XCvG/view?usp=sharing
Let me know if you need anything else.
Hi @shikhamis11, this issue is reproducible with multiples sections in the System.xml:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Magento/Config/etc/system_file.xsd">
<system>
<tab id="pos" translate="label" sortOrder="550">
<label>POS by Ebizmarts</label>
</tab>
<section id="pos_general" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
.....
</section>
<section id="pos_payment" translate="label" type="text" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<class>separator-top</class>
<label>Payment Methods</label>
<tab>pos</tab>
<resource>Ebizmarts_Pos::pos_config</resource>
.....
</section>
<section id="pos_shipping" translate="label" type="text" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Shipping methods</label>
<tab>pos</tab>
<resource>Ebizmarts_Pos::pos_config</resource>
.....
</section>
<section id="pos_cron" translate="label" type="text" sortOrder="400" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Cron</label>
<tab>pos</tab>
<resource>Ebizmarts_Pos::cron_pos</resource>
.....
</section>
<section id="pos_backup" translate="label" type="text" sortOrder="500" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Backups</label>
<tab>pos</tab>
<resource>Ebizmarts_Pos::backup_pos</resource>
.....
</section>
</system>
</config>
I've to mention that only in the first section id(pos_general) the checkbox "Use website" works as expected and delete the entry in core_config_data table. In the other sections pos_payment, pos_shipping, pos_cron, pos_backup is not working.
Replacing this line: https://github.com/magento/magento2/blob/5f3b86ab4bd3e3b94e65429fed33f748d29c1bbe/app/code/Magento/Config/Model/Config.php#L456
To pass the parameters as in the function declaration it works correctly:
$path = $this->getFieldPath($field, $fieldId, $oldConfig, $extraOldGroups);
Hi @engcom-Bravo. 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 @brian-ebizmarts
Thank you for your report.
It looks like you have third-party extensions installed on your Magento instance. Unfortunately, we have to close this issue. The GitHub issue tracker is intended for Magento Core technical issues only. Please refer to the Community Forums or the Magento Stack Exchange site for advice or general discussion about this issue.
Thank you
The bug is revealed by a third-party extension, yes. But it is still caused by a Magento Core technical issue.
I can replicate it by setting a field's config_path
property to a different section. Simplified example:
<section id="foo">
<group id="b">
<field id="c" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Foo</label>
<config_path>bar/b/c</config_path>
</field>
</group>
</section>
Fixing the argument order as detected by @brian-ebizmarts solves the issue.
@shikhamis11 @engcom-Bravo This needs to be reopened.
Based on feedback it seems issue should be reopened and re-verified one more time on the 2.4-develop
Hi @engcom-Alfa. 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 @brian-ebizmarts . Thank you for your report! Unfortunately, we are not able to reproduce this issue on fresh 2.4-develop. Everything works as expected. Looks like the problem has already been fixed by commit 005b10d7cd.
@brian-ebizmarts Could you take a look? Thanks!
Hi @engcom-Alfa,
The problem has been solved by the commit 005b10d. Would it be possible to add this fix on Magento 2.3?
Thanks in advance.
Hi @brian-ebizmarts .
Unfortunately, there is no such possibility to add this fix on Magento 2.3. According to the DevBlog:
The latest Magento version as of now is 2.4.1 and moving forward we will be focusing on the 2.4 and 2.5 release lines. As a result of such an approach, we will be parking the delivery of bug fixes or features for the 2.3 line and only delivering security fixes to it.
Thanks!
Will close this issue as the problem has already been fixed by commit 005b10d.
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Additional information
I found in xdebug that the function getFieldPath on the module-config is called with wrong parameters.
Function getFieldPath is declared as below Model/Config.php#L294
https://github.com/magento/magento2/blob/5f3b86ab4bd3e3b94e65429fed33f748d29c1bbe/app/code/Magento/Config/Model/Config.php#L285-L294
In function _processGroup the parameter $extraOldGroups is passed instead of $oldConfig. Config/Model/Config.php#L456
https://github.com/magento/magento2/blob/5f3b86ab4bd3e3b94e65429fed33f748d29c1bbe/app/code/Magento/Config/Model/Config.php#L456
As these two parameters are passed by reference $extraOldGroups overwrite the $oldConfig consequently the checkbox status won't validate and the value is not deleted.
https://github.com/magento/magento2/blob/5f3b86ab4bd3e3b94e65429fed33f748d29c1bbe/app/code/Magento/Config/Model/Config.php#L460-L471
I've noticed inheritance problems between scopes when trying to use multiples sections in system.xml.