magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.59k stars 9.32k forks source link

Admin Order - Email is Now Required - Magento 2.2.6 #22251

Closed trucatchtraps closed 4 years ago

trucatchtraps commented 5 years ago

Important information after discussion with Product Departmen

This issue has been discussed with Magento Product Manager(PO).

Changes from b1eece2 were made by the Core team intentionally. It was based on several reports and escalations/complaints from different clients through Magento Support channel. The main idea was that specific of their businesses did not allow to accept any auto-generated email addresses in the case when field is empty(previous behavior).

Please see for more details: https://github.com/magento/magento2/pull/22648#issuecomment-490253069

But after a couple of additional meetings with PO was found compromise and solution how it can be fixed/implemented to be approved. Details and requirements here: https://github.com/magento/magento2/pull/22648#issuecomment-490253069

Preconditions (*)

  1. Magento 2.2.6 and newer

Steps to reproduce (*)

  1. Sales -> Orders
  2. Create New Order
  3. Create New Customer
  4. Select Store View or if Single-Store Mode it brings you to the Order Information Page
  5. Email field is now required

Expected result (*)

  1. Email field is NOT required (like versions prior to 2.2.6)

Actual result (*)

  1. Email field is required

Additional Information (*)

The email field has never been required prior to 2.2.6 even going back to Magento1. Now the email field is required when placing an order on the backend of Magento. There is absolutely no documentation about this change or at least I have not found any. I will revert it with a custom module myself if someone points me to the code that makes it a required field. This needs to be a Config option to have the email required or not required. This is causing us major issues because now we have to try and make up random email address for customers. Not all the people in this world have an email address and some just prefer not to give it out. This is a bug not a feature. Please do not tell me this is normal function of Magento when it hasn't been since the beginning of Magento.

Screenshots (*)

Magento 2.2.4 IxikJ

Magento 2.2.6 iWVci

m2-assistant[bot] commented 5 years ago

Hi @trucatchtraps. 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-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@trucatchtraps do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

m2-assistant[bot] commented 5 years ago

Hi @engcom-backlog-nazar. 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:

ghost commented 5 years ago

@magento-engcom-team give me 2.2.3 instance

magento-engcom-team commented 5 years ago

Hi @engcom-backlog-nazar. Thank you for your request. I'm working on Magento 2.2.3 instance for you

magento-engcom-team commented 5 years ago

Hi @engcom-backlog-nazar, here is your Magento instance. Admin access: https://i-22251-2-2-3.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

ghost commented 5 years ago

HI @trucatchtraps thank you for you report, this is the "big issue" to have a not required email, and this was included in CHANGELOG.md, so there is a issue in older version where this field was not required. DeepinScreenshot_select-area_20190410100110

trucatchtraps commented 5 years ago

That field has never been required in all my time working with Magento. Why is there now an issue with the email not required? And this is for backend orders. I just don't understand why it needs to be required for backend orders. Do you have a commit for the changes? I would like to override them.

driskell commented 5 years ago

@engcom-backlog-nazar Please can we reopen.

The changelog appears to refer to frontend guest checkout and not backend MOTO orders which have never required email and instead generated a random example.com placeholder email.

The configuration for the default email domain actually still exists so this is a bug. Default should be not required for MOTO (they are taking telephone calls to place orders - most users here do not have email addresses)

F5F02FDA-BF7B-4F14-BAC8-4B788E4DA7D5

driskell commented 5 years ago

The commit that rolled back this feature was here:

https://github.com/magento/magento2/commit/b1eece2f41e99329afd0bb682f2674c0680b258c#diff-b79fbcef70631d52e90840aaf9a0d94d

@joanhe do you know what the reason for removing this feature was? The commit has actually left the constant and the configuration itself dangling with no use. Would be great to see this restored for next version and if necessary made optional.

magento-engcom-team commented 5 years ago

:white_check_mark: Confirmed by @engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-99353, MAGETWO-99354 were created

Issue Available: @engcom-backlog-nazar, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

trucatchtraps commented 5 years ago

I tried reverting that commit with a custom module but received the same results of the email being required on admin order.

driskell commented 5 years ago

@trucatchtraps We reverted the commit mentioned above and it restored original functionality perfectly. No longer required, and when left blank, auto-generates using the Default Email Domain

trucatchtraps commented 5 years ago

I must have missed something then...will try again

trucatchtraps commented 5 years ago

@driskell - I have tried it a couple different ways but still not showing the override for Magento\Sales\Block\Adminhtml\Order\Create\Form\Account on the backend. Can you please take a look at the custom module I created? The attached files I try to override the whole file, I have also tried to extend the original file and only include the affected classes but neither seems to be working.

Trucatch.zip

Thanks!

solwininfotech commented 5 years ago

I am working on this at #dmcdindia19

m2-assistant[bot] commented 5 years ago

Hi @solwininfotech. 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:

jayachandraoggy commented 5 years ago

@magento-engcom-team give me 2.2.6 instance

magento-engcom-team commented 5 years ago

Hi @jayachandraoggy. Thank you for your request. I'm working on Magento 2.2.6 instance for you

magento-engcom-team commented 5 years ago

Hi @jayachandraoggy, here is your Magento instance. Admin access: https://i-22251-2-2-6.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

jayachandraoggy commented 5 years ago

I am working on this #codilar

trucatchtraps commented 5 years ago

Any update to this? I am still not able to revert the commit using a custom module. I moved to 2.3.1 but the issue is still present. I reattached my custom module, if someone wouldn't mind taking a look quick

Trucatch.zip

trucatchtraps commented 5 years ago

I finally was able to remove the required * for the email address, but now when I try to place an order without an email address, I receive the following errors.

The value of attribute "Email" must be set Validation is failed.

magento-engcom-team commented 4 years ago

Hi @trucatchtraps. Thank you for your report. The issue has been fixed in magento/magento2#24479 by @solwininfotech in 2.4-develop branch Related commit(s):

The fix will be available with the upcoming 2.4.0 release.