-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
This issue is automatically created based on existing pull request: #38462: Set isSecureArea before deleting customer
Deletion of the customer is only possible if isSecureArea is true. If it is not set deletion will fail with an exception and the customer will not know why the registration failed and will not be able to register again due to the existing entity.
Description (*)
When the address form is enabled in the registration and an required address field is missing the registration will fail with the message "Delete operation is forbidden for current area". This is because first the customer is created and then the address is saved. When the address cannot be saved due to validation errors the customer needs to be deleted which will fail in a non secure area. Then the customer cannot register again because the customer entity already exists. Deletion is not possible because isSecureArea is not set at this point. This PR sets isSecureArea for the deletion process.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
- Enable address form in customer registration in customer_account_create.xml:
<referenceBlock name="customer_form_register">
<arguments>
<argument name="show_address_fields" xsi:type="boolean">true</argument>
</arguments>
</referenceBlock>
- Go to /customer/account/create/
- Fill in the form
- Remove an required address field
- Send the form
Questions or comments
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status