Magento2: B2B Register new user outputs exception when address form is enabled

Created on 6 Sep 2017  路  5Comments  路  Source: magento/magento2

Preconditions

  1. Magento2 2.2, EE rc23, B2B 1.0.0-rc2.1
  2. enabled address fields within shop registration (http://www.webmull.com/magento-2-display-address-field-in-register-page/) ->
    screenshot-3

  3. base theme: luma

Steps to reproduce

  1. go to shop frontend
  2. go to create new account
  3. enter all fields (including company text field)
  4. click create account

Expected result

  1. user account is created and user account info page is shown

Actual result

  1. user is created
  2. but exception is shown:
    screenshot-1

The problem is within Magento/Company/Model/Plugin/AccountManagement::afterCreateAcount L119 where the company data is read by the post request which is not an array within the default register template from the module module-customer-custom-attributes/view/frontend/templates/customer/form/register.phtml L68

submitted request payload on account creation:
{code}
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="success_url"

------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="error_url"

------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="firstname"

asdf
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="lastname"

asdf
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="create_address"

1
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="company"

2wsdf
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="telephone"

290293
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="street[]"

stras
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="street[]"

strasse
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="city"

qwer
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="region_id"

5
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="region"

------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="postcode"

2342
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="country_id"

US
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="default_billing"

1
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="default_shipping"

1
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="email"

[email protected]
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="password"

iShallPass1
------WebKitFormBoundary6oHJsm1FC9SiWXp8
Content-Disposition: form-data; name="password_confirmation"

iShallPass1
------WebKitFormBoundary6oHJsm1FC9SiWXp8--
{code}

Clear Description Format is valid

All 5 comments

@brosenberger thank you for your report. Please follow these guidelines for proper tracking of your issue. You can report Commerce-related issues in one of two ways:
You can use the Support portal associated with your account
or
If you are a Partner reporting on behalf of a merchant, use the Partner portal.
GitHub is intended for Magento Open Source users to report on issues related to Open Source only. There are no account management services associated with GitHub.

Hi @magento-engcom-team,
I thought it was okay to report all 2.2 RC issues here, including those with B2B, has that changed?
Please see this comment by @misha-kotov for reference.

Hi @korostii sorry for confusing. Reporting of Magento Commerce issue on public GitHub was allowed only for 2.2-rc program. We reopned the issue and added required labels. Thank you for pointing on this 馃憤

@brosenberger thank you for your report. Please follow these guidelines for proper tracking of your issue. You can report Commerce-related issues in one of two ways:
You can use the Support portal associated with your account
or
If you are a Partner reporting on behalf of a merchant, use the Partner portal.

GitHub is intended for Magento Open Source users to report on issues related to Open Source only. There are no account management services associated with GitHub.

I'm having the weirdest case of deja vu.

@magento-engcom-team do you not ever read the comments in the discussion above?

Was this page helpful?
0 / 5 - 0 ratings