Closed
Bug 216245
Opened 21 years ago
Closed 19 years ago
subscribe/account wizard for newsgroups forgets account name
Categories
(SeaMonkey :: MailNews: Message Display, defect)
SeaMonkey
MailNews: Message Display
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: patrick.hendriks+bugzilla, Assigned: standard8)
References
Details
(Keywords: fixed-seamonkey1.1a, fixed1.8.1)
Attachments
(4 files, 4 obsolete files)
15.32 KB,
image/jpeg
|
Details | |
14.58 KB,
image/jpeg
|
Details | |
7.34 KB,
patch
|
standard8
:
review+
Bienvenu
:
superreview+
mscott
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
4.96 KB,
patch
|
Bienvenu
:
review+
Bienvenu
:
superreview+
mscott
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030813 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030813 Couldn't find this one. The wizard for subscribing the newsgroups lets you choose an account name. However this name is forgotten after pressing NEXT. Reproducible: Always Steps to Reproduce: 1. Subscribe to a newsgroup on a server to which you're not yet subscribed, for instance in a new profile news://news.mozilla.org/netscape.public.mozilla.general 2. go to the wizards steps. After filing out some other info you get to pick account name. Delete the default name and type "Mozilla" instead [screenshot 1] 3. Click next 4. The Account wizard congratulates you, but shows replaced the user provided account name with the default name again [screenshot 2] 3. Actual Results: information entered would be remembered Expected Results: information entered was forgotten Tested with clean profile as well. Screenshots coming up.
This fixes the problem but not sure if it breaks ISPs stuff.
Assignee: sspitzer → bugzilla
Status: NEW → ASSIGNED
Attachment #160088 -
Flags: review?(neil.parkwaycc.co.uk)
Updated•20 years ago
|
Product: Browser → Seamonkey
Ian, i'll try your patch later. Is this something that would reside in CORE nowadays? Also, can you fix the typo in // If the AccountData exists, tha means we have values read from rdf file. -> "tha" -> "that" What ISP stuff could be broken by this? Anything special i should keep an eye out for?
Attachment #160088 -
Flags: review?(neil.parkwaycc.co.uk)
Changes since v0.1a * Fixed typo in comment
Attachment #160088 -
Attachment is obsolete: true
Attachment #187987 -
Flags: review?(mnyromyr)
Comment 7•19 years ago
|
||
Comment on attachment 187987 [details] [diff] [review] Tweaked simple patch v0.1a > var accountName=""; >- if (pageData.accname && pageData.accname.prettyName) { >+ if (pageData.accname && pageData.accname.prettyName) > accountName = pageData.accname.prettyName.value; >- >- // If the AccountData exists, tha means we have values read from rdf file. >+ else { >+ // If the AccountData exists, that means we have values read from rdf file. The checking mechanism of the previous wizard page (in aw-accname.js) ensures that pageData.accname.prettyName is *never* empty (except in edge cases), so the else clause effectively cuts off that part. See the original version of this block in <http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show& root=/cvsroot&subdir=mozilla/mailnews/base/prefs/resources/content&command=DIFF _FRAMESET&file=aw-done.js&rev2=1.10&rev1=1.9> for what most probably was meant...
Attachment #187987 -
Flags: review?(mnyromyr) → review-
Assignee | ||
Comment 8•19 years ago
|
||
This fix takes a slightly different approach. Basically, if the user hasn't entered a value for account name, and a name is specified in the current account details, then we will use it, otherwise we use what they entered. The "otheraccount" additional line also fixes a js problem which I believe was fallout from bug 253519. I've tested on seamonkey for: news link, mail account, news account, movemail & isp specific data. thunderbird: mail account, news account, movemail, rss & isp specific data. I couldn't work out how to get a news link into thunderbird, but I don't see any problems with that if you can.
Attachment #191795 -
Flags: review?(mnyromyr)
Assignee | ||
Updated•19 years ago
|
OS: Windows XP → All
Hardware: PC → All
Assignee | ||
Comment 9•19 years ago
|
||
*** Bug 141852 has been marked as a duplicate of this bug. ***
Comment 10•19 years ago
|
||
Comment on attachment 191795 [details] [diff] [review] Fixes the account name setting. Looks good, just a few unrelated ;-) comments. > setPageData(pageData, "accname", "prettyName", accountname); >+ // Set this to true so we know the user has set the name. >+ setPageData(pageData, "accname", "userset", true); This is quite a strange function, as it creates lots of normal arrays that aren't actually used as normal arrays, but as associative arrays only (AFAICT!) - and these are actually just objects in JS. Judging by the comments there, the author probably didn't exactly knew the difference... BTW: I get some JS strict errors in that dialog, partly even without this patch: JavaScript strict warning: chrome://messenger/content/AccountWizard.js, line 631: function setupCopiesAndFoldersServer does not always return a value JavaScript strict warning: chrome://messenger/content/AccountWizard.js, line 642: function setupCopiesAndFoldersServer does not always return a value JavaScript strict warning: chrome://messenger/content/AccountWizard.js, line 644: function setupCopiesAndFoldersServer does not always return a value JavaScript strict warning: chrome://messenger/content/aw-accounttype.js, line 78: reference to undefined property gCurrentAccountData.wizardSkipPanels JavaScript strict warning: chrome://messenger/content/aw-accounttype.js, line 93: assignment to undeclared variable skipArray JavaScript strict warning: chrome://messenger/content/aw-done.js, line 72: reference to undefined property currentAccountData.emailIDFieldTitle Your patch fixes these: JavaScript strict warning: chrome://messenger/content/aw-server.js, line 133: reference to undefined property pageData.accounttype.otheraccount JavaScript error: chrome://messenger/content/aw-server.js, line 133: pageData.accounttype.otheraccount has no properties Maybe you could at least fix the strict warnings in those files you're touching anyway?
Attachment #191795 -
Flags: review?(mnyromyr) → review+
Assignee | ||
Comment 11•19 years ago
|
||
(In reply to comment #10) > JavaScript strict warning: chrome://messenger/content/aw-accounttype.js, line > 78: reference to undefined property gCurrentAccountData.wizardSkipPanels > JavaScript strict warning: chrome://messenger/content/aw-accounttype.js, line > 93: assignment to undeclared variable skipArray > JavaScript strict warning: chrome://messenger/content/aw-done.js, line 72: > reference to undefined property currentAccountData.emailIDFieldTitle Karsten, I fixed the others, but can't replicate these - I'd like to be able to before I try and "fix" them. Can you give me some pointers please?
Status: NEW → ASSIGNED
Assignee | ||
Comment 12•19 years ago
|
||
I've address Mnyromyr's comments and removed all the strict warnings. Carrying forward his r. Requesting sr. (btw this fixes both SeaMonkey & Thunderbird)
Attachment #194016 -
Flags: superreview?(bienvenu)
Attachment #194016 -
Flags: review+
Updated•19 years ago
|
Attachment #194016 -
Flags: superreview?(bienvenu) → superreview+
Assignee | ||
Updated•19 years ago
|
Attachment #191795 -
Attachment is obsolete: true
Assignee | ||
Updated•19 years ago
|
Attachment #187987 -
Attachment is obsolete: true
Assignee | ||
Comment 13•19 years ago
|
||
Comment on attachment 194016 [details] [diff] [review] Fix the account name setting v2 (checked in to trunk + branch) I just checked this into trunk. I'm leaving open whilst requesting approval for 1.8 branch. This patch fixes the account name setting when performed via the account wizard for both SeaMonkey and Thunderbird.
Attachment #194016 -
Attachment description: Fix the account name setting v2 → Fix the account name setting v2 (checked in to trunk)
Attachment #194016 -
Flags: approval1.8b4?
Comment 14•19 years ago
|
||
Comment on attachment 194016 [details] [diff] [review] Fix the account name setting v2 (checked in to trunk + branch) > if (pageData.accname && pageData.accname.prettyName) { > accountName = pageData.accname.prettyName.value; > >- // If the AccountData exists, tha means we have values read from rdf file. >+ // Only if the user hasn't set the account name should we use the >+ // values from the rdf file - if the account data exists. > // Get the pretty name and polish the account name >- if ( currentAccountData && >- currentAccountData.incomingServer.prettyName) >+ if (pageData.accname.userset && >+ !pageData.accname.userset.value && >+ currentAccountData && >+ currentAccountData.incomingServer.prettyName) > { > var prettyName = currentAccountData.incomingServer.prettyName; > // Get the polished account name > accountName = gPrefsBundle.getFormattedString("accountName", > [prettyName, > userName]); > // Set that to be the name in the pagedata > pageData.accname.prettyName.value = accountName; Would you mind confirming/explaining what used to happen in the following cases: a) new account - page data holds user entered name, account data holds no name b) news server - page data holds user entered name, account data holds news server name c) isp account - account data holds isp entered name, page data holds what? I can think of two possibilities: i) c) page data is blank, but that would seem to mean that the code never used to work ii) c) page data holds isp entered name, so that the override code is unnecessary
Assignee | ||
Comment 15•19 years ago
|
||
> Would you mind confirming/explaining what used to happen in the following > cases: > a) new account - page data holds user entered name, account data holds no name Correct. > b) news server - page data holds user entered name, account data holds news > server name Correct as long as you take news accounts selected for creation in the wizard as case a). In full: If going via a news:// link then b) applies. If creating a new account via selecting on the wizard, then a) applies. > c) isp account - account data holds isp entered name, page data holds what? > I can think of two possibilities: > i) c) page data is blank, but that would seem to mean that the code never used > to work > ii) c) page data holds isp entered name, so that the override code is > unnecessary ok, I'm still looking at this, it depends on the exact isp data. One case is example.rdf where we allow the user to set the name (page data) but then use the account data to modify it. So now I've fixed the news group one, but broken some cases of isp data :-( All of the isp data account name settings are a bit strange anyway, because the user can modify them afterwards regardless of what the wizard created them as. I'll see if I can come up with an improved fix later.
Assignee | ||
Comment 16•19 years ago
|
||
Comment on attachment 194016 [details] [diff] [review] Fix the account name setting v2 (checked in to trunk + branch) Removing approval request as it breaks isp data.
Attachment #194016 -
Flags: approval1.8b4?
Assignee | ||
Comment 17•19 years ago
|
||
Ok, this patch fixes the ispdata regression - we now check to see if the data was isp supplied, and if it was we also add in a check to see if we should be using the user supplied accountName, or just the first part of the email address. This seems to work correctly for all the rdf examples of ispdata that we have in the tree and for creating new newsgroups.
Attachment #201991 -
Flags: superreview?(bienvenu)
Attachment #201991 -
Flags: review?(mnyromyr)
Comment 18•19 years ago
|
||
Comment on attachment 201991 [details] [diff] [review] Fix the ispdata regression/problem. + if (pageData.accname.userset && pageData.accname.userset.value) + { + accountName = gPrefsBundle.getFormattedString("accountName", + [prettyName, + accountName]); + } + else + { + accountName = gPrefsBundle.getFormattedString("accountName", + [prettyName, + userName]); + } you can use the ? operator here, I would think to choose between userName and accountName based on the if criteria. And, do we even need the accountName variable at all? Can't we set pageData.accname.prettyName.value directly to the result of gPrefsBundle.getFormattedString...?
Attachment #201991 -
Flags: superreview?(bienvenu) → superreview-
Assignee | ||
Updated•19 years ago
|
Attachment #201991 -
Flags: review?(mnyromyr)
Assignee | ||
Comment 19•19 years ago
|
||
Revised to remove the use of the extra variables that are essentially redundant.
Attachment #201991 -
Attachment is obsolete: true
Attachment #203155 -
Flags: superreview?(bienvenu)
Attachment #203155 -
Flags: review?(bienvenu)
Updated•19 years ago
|
Attachment #203155 -
Flags: superreview?(bienvenu)
Attachment #203155 -
Flags: superreview+
Attachment #203155 -
Flags: review?(bienvenu)
Attachment #203155 -
Flags: review+
Assignee | ||
Comment 20•19 years ago
|
||
Comment on attachment 203155 [details] [diff] [review] Fix the ispdata regression/problem v2 (checked in to trunk + branch) This patch is now in on trunk: new revision: 1.129; previous revision: 1.128 done Checking in mailnews/base/prefs/resources/content/aw-done.js; /cvsroot/mozilla/mailnews/base/prefs/resources/content/aw-done.js,v <-- aw-done.js new revision: 1.23; previous revision: 1.22
Attachment #203155 -
Attachment description: Fix the ispdata regression/problem v2 → Fix the ispdata regression/problem v2 (checked in)
Assignee | ||
Comment 21•19 years ago
|
||
Regression fixed -> bug fixed :-)
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 22•18 years ago
|
||
Comment on attachment 194016 [details] [diff] [review] Fix the account name setting v2 (checked in to trunk + branch) Requesting 1.8.1 branch approval for this patch that has been on the trunk for quite a while now. It'll need the second patch on this bug as well to avoid the regression.
Attachment #194016 -
Flags: approval-branch-1.8.1?(mscott)
Assignee | ||
Comment 23•18 years ago
|
||
Comment on attachment 203155 [details] [diff] [review] Fix the ispdata regression/problem v2 (checked in to trunk + branch) The second patch on this bug that needs to go in with the first...
Attachment #203155 -
Flags: approval-branch-1.8.1?(mscott)
Updated•18 years ago
|
Attachment #194016 -
Flags: approval-branch-1.8.1?(mscott) → approval-branch-1.8.1+
Updated•18 years ago
|
Attachment #203155 -
Flags: approval-branch-1.8.1?(mscott) → approval-branch-1.8.1+
Assignee | ||
Updated•18 years ago
|
Attachment #194016 -
Attachment description: Fix the account name setting v2 (checked in to trunk) → Fix the account name setting v2 (checked in to trunk + branch)
Assignee | ||
Updated•18 years ago
|
Attachment #203155 -
Attachment description: Fix the ispdata regression/problem v2 (checked in) → Fix the ispdata regression/problem v2 (checked in to trunk + branch)
Assignee | ||
Updated•18 years ago
|
Keywords: fixed-seamonkey1.1a,
fixed1.8.1
Component: MailNews: Subscribe → MailNews: Message Display
QA Contact: stephend → search
You need to log in
before you can comment on or make changes to this bug.
Description
•