Closed Bug 1542484 Opened 5 years ago Closed 5 years ago

warnings when creating new News account

Categories

(MailNews Core :: Account Manager, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 68.0

People

(Reporter: aceman, Assigned: aceman)

Details

Attachments

(1 file, 1 obsolete file)

Creating new News account I get these warnings in the console:
ReferenceError: reference to undefined property "newsserver" in aw-incoming.js:69:7

ReferenceError: reference to undefined property "ServerType-nntp"AccountWizard.js:455:1

Attached patch 1542484.patch (obsolete) — Splinter Review

The pageData.newsserver.hostname is set only when you got Back in the wizard and then go Next, so the input is repopulated from this variable. So for the first visit of the page, pageData.newsserver.hostname is empty, so handle that cleanly.

Attachment #9056331 - Flags: review?(jorgk)
Product: Thunderbird → MailNews Core
Comment on attachment 9056331 [details] [diff] [review]
1542484.patch

Review of attachment 9056331 [details] [diff] [review]:
-----------------------------------------------------------------

::: mailnews/base/prefs/content/AccountWizard.js
@@ +450,5 @@
>  
> +    // See if there are any protocol-specific attributes.
> +    // If so, we use the type to get the IID, QueryInterface
> +    // as appropriate, then copy the data over.
> +    let serverAttrs = (("ServerType-" + srcServer.type) in srcServer) ?

Maybe a local variable here?

@@ +452,5 @@
> +    // If so, we use the type to get the IID, QueryInterface
> +    // as appropriate, then copy the data over.
> +    let serverAttrs = (("ServerType-" + srcServer.type) in srcServer) ?
> +                      srcServer["ServerType-" + srcServer.type] : null;
> +    dump("srcServer.ServerType-" + srcServer.type + " = " + serverAttrs + "\n");

Use dump(` ... `) here.
Attachment #9056331 - Flags: review?(jorgk) → review+
Attached patch 1542484.patch v2Splinter Review

Thanks.

Attachment #9056331 - Attachment is obsolete: true
Attachment #9056335 - Flags: review+
Keywords: checkin-needed
Target Milestone: --- → Thunderbird 68.0

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/e07c8f10fbcb
fix some warnings when creating a News account. r=jorgk

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: Thunderbird 68.0 → ---
Target Milestone: --- → Thunderbird 68.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: