Problem/Motivation

Prior to #2925064: [1/2] JS codestyle: no-restricted-syntax the site email address was copied to the user email address:

The browser also displays a javascript error in drupal.js?v=8.5.0-dev:13:

 Uncaught TypeError: Array.prototype.push called on null or undefined
    at push (<anonymous>)
    at Array.forEach (<anonymous>)
    at Object.attach (system.js?v=8.5.0-dev:13)
    at drupal.js?v=8.5.0-dev:25
    at Array.forEach (<anonymous>)
    at Object.Drupal.attachBehaviors (drupal.js?v=8.5.0-dev:22)
    at drupal.init.js:16
    at HTMLDocument.t (ready.min.js?v=1.0.8:4)

Proposed resolution

  1. Restore the behavior where the entered site mail address is copied to the user email adress
  2. Fix the javascript error

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

The site email address in the install profile form is copied to the user email address

API changes

None.

Data model changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

idebr created an issue. See original summary.

idebr’s picture

Issue summary: View changes
FileSize
57.83 KB
msankhala’s picture

Assigned: Unassigned » msankhala

Assigning me and trying to reproduce this issue in 8.6.x-dev.

msankhala’s picture

I can reproduce this issue on 8.6.x branch as well. Browser throw this error in console mentioned by @idebr on Configure site installation step. I think this issue is to do with https://github.com/ded/domready library used by drupal.

droplet’s picture

Assigned: msankhala » Unassigned
Status: Active » Needs review
Issue tags: +syntax error
FileSize
1.32 KB
msankhala’s picture

I can confirm patch #5 fixes this issue on 8.6.x branch. +1 @droplet for patch.

msankhala’s picture

Status: Needs review » Reviewed & tested by the community

I am not sure if Javascript Test is required for this or not. Moving it to RTBC feel free to open again if TestCase is required or there is any other bug related to this.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs tests

Given this is a regression introduced by a code style improvement I think we should commit the fix but open a followup for testing. Especially as this affects the 8.5.0 beta.

Committed 3840ad2 and pushed to 8.6.x. Thanks!

@msankhala thanks for reviewing the issue and testing it. Whilst your reviews didn't materially affect the patch you provided evidence of testing and how you did it. So I'm crediting you on d.o but not on the patch.

  • alexpott committed 3840ad2 on 8.6.x
    Issue #2941106 by droplet, idebr: Site email address in the install...

  • alexpott committed 1cf6343 on 8.5.x
    Issue #2941106 by droplet, idebr: Site email address in the install...
alexpott’s picture

Backported to 8.5.x since this is a regression introduced in the development of that patch that could impact live site's UIs.

Committed 1cf6343 and pushed to 8.5.x. Thanks!

alexpott’s picture

dawehner’s picture

In case someone is curious why this doesn't work:

arr.forEach(function callback(currentValue[, index[, array]]) {
    //your iterator
}[, thisArg]);
```arr.push(element1[, ...[, elementN]])```

So, each bit of the forEach would push the value, index and array all the time. In order words, let's never be clever about these functions for build in functions.

dawehner’s picture

On the positive side of things, we now have a bit more of an idea where we lack test coverage.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.