Closed Bug 1822604 Opened 1 year ago Closed 1 year ago

Error when trying to place an SPOC topsite to the last spot with a new browser profile

Categories

(Firefox :: New Tab Page, defect)

defect

Tracking

()

VERIFIED FIXED
113 Branch
Tracking Status
firefox112 + verified
firefox113 --- verified

People

(Reporter: nanj, Assigned: nanj)

References

Details

Attachments

(1 file, 1 obsolete file)

With a new browser profile, when setting spoc-topsite-positions to 7, seeing the following error message:

JavaScript error: resource://activity-stream/lib/TopSitesFeed.jsm, line 928: TypeError: can't access property "show_sponsored_label", withPinned[index] is undefined

Offhand I think it's because we only have 7 organic tiles (i.e. default tiles), but it wanted to access withPinned[7] which would be undefined. We will need to consider those empty slots when injecting spoc tiles to the topsites array.

Duplicate of this bug: 1822347
Assignee: sdowne → najiang

[Tracking Requested - why for this release]: this is a bugfix for a feature agains which we're going to run an experiment in release 112.

Attachment #9323613 - Attachment is obsolete: true
Pushed by najiang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/77bb7e3dc44c
Fix an edge case for spoc topsites injection r=thecount
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Comment on attachment 9324098 [details]
Bug 1822604 - Fix an edge case for spoc topsites injection r=thecount

Beta/Release Uplift Approval Request

  • User impact if declined: The experiment user group will not be able to dismiss certain topsites as expected
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Please reference STR of Bug 1822347
  • List of other uplifts needed: Bug 1822027
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This patch would only apply to some experiment users, we can turn off the experiment through Nimbus if needed.
  • String changes made/needed: None
  • Is Android affected?: No
Attachment #9324098 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Hi Carmen, could you also verify this fix using this STR? Thanks!

Flags: needinfo?(cfat)
QA Whiteboard: [qa-triaged]

I have verified this issue on the latest Firefox Nightly 113.0a1 (Build ID: 20230321213816), on Windows 10 x64, macOS 12.6.1, and Ubuntu 20.04 x64.

  • I used the STR from Bug 1822347 and can confirm that all the non-sponsored tiles can be dismissed correctly.
  • I also verified that the dismissed tiles are not re-displayed at browser restart and in New Windows and new tabs.
Flags: needinfo?(cfat)

Comment on attachment 9324098 [details]
Bug 1822604 - Fix an edge case for spoc topsites injection r=thecount

Approved for 112.0b6

Attachment #9324098 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I have verified this issue on the latest Firefox Beta 112.0b6 (Build ID: 20230323181038), on Windows 10 x64, macOS 12.6.1, and Ubuntu 20.04 x64.

  • I used the STR from Bug 1822347 and can confirm that all the non-sponsored tiles can be dismissed correctly.
  • I also verified that the dismissed tiles are not re-displayed at browser restart and in New Windows and new tabs.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: