Closed Bug 1118194 Opened 5 years ago Closed 5 years ago

Clicking Validate link on Feed Subscriptions dialog does nothing

Categories

(SeaMonkey :: MailNews: General, defect)

defect
Not set

Tracking

(seamonkey2.32 fixed, seamonkey2.33 fixed, seamonkey2.34 fixed, seamonkey2.35? fixed)

RESOLVED FIXED
seamonkey2.35
Tracking Status
seamonkey2.32 --- fixed
seamonkey2.33 --- fixed
seamonkey2.34 --- fixed
seamonkey2.35 ? fixed

People

(Reporter: InvisibleSmiley, Assigned: philip.chee)

Details

Attachments

(1 file, 1 obsolete file)

STR:
0. Have some RSS feed(s) set up
1. Open MailNews window
2. Select Subscribe from a feed's context menu
3. Select some feed
4. Click Validate.

The Error Console will then show:

Error: TypeError: this.mMainWin.openContentTab is not a function
Source File: chrome://messenger-newsblog/content/feed-subscriptions.js
Line: 1816

AFAICS there is no function called openContentTab in /suite/ (SM) code. Either it existed at one time, or the /mailnews/ (shared) code always relied on its presence in /mail/ (TB) code.

The referenced file is here:
/mailnews/extensions/newsblog/content/feed-subscriptions.js

Depending on how this needs to be fixed, this bug might have to be moved to MailNews Core.
BTW FeedMessageHandler.loadWebPage may also call openContentTab, but I couldn't find a caller of it which actually sets the tab or window property on the second argument.

FeedMessageHandler lives here:
/mailnews/extensions/newsblog/content/newsblogOverlay.js
(In reply to Jens Hatlak (:InvisibleSmiley) from comment #0)

> STR:
> Error: TypeError: this.mMainWin.openContentTab is not a function
> Source File: chrome://messenger-newsblog/content/feed-subscriptions.js
> Line: 1816

openContentTab is a Thunderbird specific function.
http://mxr.mozilla.org/comm-central/source/mail/base/content/utilityOverlay.js?rev=a005bdfa37f3&mark=236-243#229

Simplest option is to create a stub openContentTab() in our utilityOverlay.js that just redirects to our openUILinkIn(url, where) e.g.

function openContentTab(url, where, handlerRegExp) {
  openUILinkIn(url, where) // handlerRegExp not relevant to SeaMonkey
}
Attached patch Patch v1.0 Proposed fix (obsolete) — Splinter Review
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Attachment #8544800 - Flags: review?(iann_bugzilla)
Attachment #8544800 - Flags: feedback?(jh)
Comment on attachment 8544800 [details] [diff] [review]
Patch v1.0 Proposed fix

Yes, that should do; thought the same.

Nits: Would put a semicolon before the comment and maybe change the parameter names to start with "a". Optionally add a comment denoting that this is a TB compat function.
Attachment #8544800 - Flags: feedback?(jh) → feedback+
Changes in this patch
1. start parameter names with "a".
2. add missing statement terminator semicolon.
3. add a comment explaining that this is a Thunderbird compatibility shim. Some code in shared /mailnews/ expects this function to exist.
Attachment #8544800 - Attachment is obsolete: true
Attachment #8544800 - Flags: review?(iann_bugzilla)
Attachment #8547757 - Flags: superreview?(mnyromyr)
Attachment #8547757 - Flags: review?(mnyromyr)
Comment on attachment 8547757 [details] [diff] [review]
Patch v2.0 move function to tabmail.js

>+// Thunderbird compatibility function called from e.g. newsblog.
>+function openContentTab(aUrl, aWhere, aHandlerRegExp)
>+{
>+  openUILinkIn(aUrl, aWhere); // aHandlerRegExp is not relevant to SeaMonkey.
>+}

Rather than have two separate comments, just have one covering both points.
r=me with that addressed
Attachment #8547757 - Flags: superreview?(mnyromyr)
Attachment #8547757 - Flags: review?(mnyromyr)
Attachment #8547757 - Flags: review+
http://hg.mozilla.org/comm-central/rev/da03eac9921d
Target Milestone: --- → seamonkey2.35
Comment on attachment 8547757 [details] [diff] [review]
Patch v2.0 move function to tabmail.js

[Triage Comment]
a=me for c-a and c-b
Attachment #8547757 - Flags: approval-comm-beta+
Attachment #8547757 - Flags: approval-comm-aurora+
Comment on attachment 8547757 [details] [diff] [review]
Patch v2.0 move function to tabmail.js

[Approval Request Comment]
Regression caused by (bug #): newsblog calling a Thunderbird specific function.
User impact if declined: Unable to verify RSS feeds.
Testing completed (on m-c, etc.): Landed on SeaMonkey 2.35, 2.34, 2.33
Risk to taking this patch (and alternatives if risky): none adds a function that newsblog expects to exist.
String changes made by this patch: none.
Attachment #8547757 - Flags: approval-comm-release?
Attachment #8547757 - Flags: approval-comm-release? → approval-comm-release+
You need to log in before you can comment on or make changes to this bug.