-
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
Dynamic Rows - deleteValue/deleteProperty not used on deleting records #29574
Comments
Hi @gwharton. Thank you for your report.
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:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 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. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
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.
|
@gwharton . The issue is still reproducible on fresh 2.4-develop. Steps to reproduce:
Actual Result: ❌ Only 1 record is passed to save controller. |
✅ Confirmed by @engcom-Alfa 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. |
@Den4ik Thank you for verifying the issue. Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
Once all required information is added, please add label |
I think we should increase Priority and Severity to P2 and S2 because issue affect to user experience |
✅ Confirmed by @Den4ik 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. |
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. |
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.
The text was updated successfully, but these errors were encountered: