-
Notifications
You must be signed in to change notification settings - Fork 9.4k
24070 - Allowed multivalue form elements to submit data to website/gr… #24094
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
24070 - Allowed multivalue form elements to submit data to website/gr… #24094
Conversation
…oup/store entities. Multivalue elements input[] gets removed and not posted to the website/group/store controller.
Hi @ericclaeren. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
app/code/Magento/Backend/view/adminhtml/web/js/validate-store.js
Outdated
Show resolved
Hide resolved
07726e4
to
bf071ff
Compare
Hi @VladimirZaets, have fixed the variable declarations and ran into js linting errors which I have resolved. Would you mind reviewing my code again? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixes.
Hi @VladimirZaets, thank you for the review.
|
@ericclaeren thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
@VladimirZaets The purpose of this change is untested by auto-test. Although Magento Core has a jasmin JS test for this validate function, there isn't a test for the _saveHandler() method. See: validate-store.test.js. So the whole core JS functionality isn't being tested right now. |
@magento-engcom-team The label has been added. |
Hi @ericclaeren seems like issue described by PR wasn't fixed.
|
@engcom-Delta please, take a look a comment from @ericclaeren |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericclaeren please sign CLA. Otherwise, we can't proceed with your PR.
Thank you.
@ericclaeren please look at #24094 (review) |
@magento run all tests |
@magento run all tests |
As code review, testing is already completed on this PR. Also the Adobe CLA is signed now. Moving this PR in Extended Testing. |
I'm not able to review this issue, I have not worked on a Magento website in the last 4 years and have no means to test any of the requested features. |
Hello @ericclaeren Thank you for your contribution. We’ve verified that the issue is still reproducible, and we can confirm that the solution proposed in this PR effectively resolves it. We’ll be taking it forward from here and proceeding with the necessary steps to get it merged. Appreciate your efforts! Thanks! |
@magento run all tests |
@magento run Functional Tests B2B, Functional Tests EE, Functional Tests CE, Static Tests, Unit Tests |
The consistent test failures for Functional B2B are known Issues and JIRA is raised for them.Other failures are inconsistent and seems to be flaky. They neither part of PR nor failing because of the PR changes. Known Issues: The consistent test failures for Functional CE is known Issues and JIRA is raised for the same. Known Issues: The consistent test failure for Functional EE is known Issues and JIRA is raised for the same. Other failures are inconsistent and seems to be flaky. They neither part of PR nor failing because of the PR changes. Known Issues: Static Test Failure Known Issue: Hence moving this PR in Merge In Progress. |
@magento run all tests |
a1baa6c
into
magento:2.4-develop
Example
Issue
Proposed solution
Description (*)
Fix for issue: #24070
When submitting a website, group or store entity form (add/edit), submitted multivalue form elements get filtered and only the last selected element will be posted to the controller.
This posted data
Turns into
Fixed Issues (if relevant)
** This:
** Turns into
Therefore the names are different and both fields can be converted to a new input to be actually posted to the controller.
I chose not to convert the first fieldname[] to fieldname[0] because altering this, I could not reference to the fieldname within the same set of data and this needed more javascript code. This is not necessary for PHP which receives fieldname[] as 0 and fieldname[1] as 1.
Used let/const because they are supported in IE11 and don't interfere with scope of the function.
Manual testing scenarios (*)
** The submitted data in validate-store.js will converted a key/value object A new html form will be generated with of the previous object entries.