Open gwharton opened 4 years ago
Hi @gwharton. 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
If I run the test module on 2.1.18 (updated version of proof of concept module that works on 2.1.18 attached) then it works as expected. In this example, I have removed the second row and saved.
It appears to have stopped working in 2.2.0, from this commit. https://github.com/magento/magento2/commit/d5f0dd2e5647c29f840efc1c03741b0e9b4f2c57
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!
Not stale
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.
@gwharton . The issue is still reproducible on fresh 2.4-develop.
Steps to reproduce:
https://<host>/admin/testdynamicrows/test/index/entity_id/1
{"post_data":{"testdynamicrows":{"testdynamicrows":[{"entity_id":"1","data_field":"Data Field 1","initialize":"true","record_id":"0"},{"entity_id":"2","data_field":"Data Field 2","initialize":"true","record_id":"1"}]},"form_key":"mDiYNxe68AaH4t3S"}}
https://<host>/admin/testdynamicrows/test/index/entity_id/1
Actual Result: :x: Only 1 record is passed to save controller.
{"post_data":{"testdynamicrows":{"testdynamicrows":[{"entity_id":"2","data_field":"Data Field 2","initialize":"true","record_id":"1"}]},"form_key":"mDiYNxe68AaH4t3S"}}
Note:
:white_check_mark: Confirmed by @engcom-Alfa
Thank you for verifying the issue. Based on the provided information internal tickets MC-40680
were created
Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!
Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily.
Please feel free to comment or reopen according to the Issue reporting guidelines
the ticket if you are still facing this issue on the latest 2.x-develop
branch. Thank you for collaboration.
Hi @Den4ik. 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:
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.@Den4ik Thank you for verifying the issue.
Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
"Reproduced on "
label(s) to this ticket based on verification resultOnce all required information is added, please add label "Issue: Confirmed"
again.
Thanks!
I think we should increase Priority and Severity to P2 and S2 because issue affect to user experience
cc @sdzhepa @gabrieldagama
:white_check_mark: Confirmed by @Den4ik
Thank you for verifying the issue. Based on the provided information internal tickets MC-40680
were created
Issue Available: @Den4ik, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@Den4ik could you please clarify how user experience is affected? I believe it's related to developer's experience and how developer will handle changes provided by the user.
In my view the bug in the dynamicRows component was introduced in 2.2.0. I suspect that the resulting bugs introduced into magento as a result of this change (any magento functionality that used the deleteValue attribute in dynamic rows would have stopped working) and was probably fixed on a case by case basis, by introducing logic to detect the deleted results and handle them, instead of fixing the underlying problem of the deleteValue functionality being broken.
Workarounds for the broken functionality were obviously introduced wherever they were needed during 2.2 and 2.3. There is currently no core functionality (that I am aware of) that is currently broken that uses the deleteProperty function of the dynamic rows component.
It is also likely that any third party developers also saw the unintended breaking change in 2.2 and implemented their own workarounds which are still in place.
The underlying deleteValue functionality remains broken though and still does not operate as the documentation suggests it should. You could just update the documentation to remove the "deleteProperty", "deleteValue" entries so code developers aren't trying to use this functionality that is broken (and hasnt worked since 2.2), introducing a note to say developers need to detect deleted rows on their own.
The deleteValue functionality is seriously useful though, as without it, you need to compare the before dataset, with the after dataset to determine any rows that have disappeared, whereas with the existing deleteValue functionality working, you are provided with a list of records that were deleted which is much more memory efficient.
It is broken because of an unintended change in the code, as highlighted above, and not because the code to implement it was removed. It was an unintended consequence of another change, and the code for deleteValue functionality is still there, just presently bypassed.
@sidolov I agree with @gwharton. I didn't check but I believe that this properties worked before and in this case all custom modules that use this properties currently provide unexpected result if they are not updated. In my opinion we should fix it as soon as possible and provide fix in patch release.
It's been broken since 2.2. I think most third parties will have worked around it by now 😀 been broken for so long, probs easier to remove it from the docs instead of fixing it. It would be useful if it worked though.
@gwharton 😄 In this case we can just update documentation for each bug. I'm still thought that fix bug and adding tests for this case is the best solution. I hope some one from community or I'll have time for take it into progress in the near future.
Can't quite believe what I've read here but explains why UI component implementation is so poorly done and hit and miss. Someone makes a change, doesn't test it properly and it results in breaking documented functionality that others may rely on. And you're joking about leaving it broken and just removing from the docs? Unprofessional! No wonder Magento is falling apart.
The point I made about removing it from the docs was.made with tongue in cheek. Hoping it may have shamed Magento Into action. Alas no.
Ok. The correct approach here is to push this back to whoever broke it and request that they reimplement their change, this time testing it properly.
@magento I am working on this
@magento give me 2.1.18 instance
Hi @Poovarasan-06. Thank you for your request. I'm working on Magento instance for you.
Hi @Poovarasan-06, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.
Magento Docs state the following for dynamic rows config
deleteProperty The property added to a record data object when the record is deleted. Applied if the deleteValue option is enabled.
deleteValue Adds the deleteProperty property in the data object for the deleted record.
If I create a dynamic rows instance and set deleteValue to true and deleteProperty to "delete". When I delete a record, and save the record set, I would expect the controller to receive a data set including the deleted row, but with the deleted row marked with "delete" so the controller can easily see a deleted record and handle the removal.
I am not seeing this behaviour.
Preconditions (*)
Steps to reproduce (*)
https://<host>/admin/testdynamicrows/test/index/entity_id/1
https://<host>/admin/testdynamicrows/test/index/entity_id/1
Expected result (*)
Actual result (*)
Proof of concept Module attached here. testdynamicrows.zip
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.