Sync "Sponsored Stories" preference

VERIFIED FIXED in Firefox 69

Status

()

enhancement
P3
normal
VERIFIED FIXED
7 months ago
24 days ago

People

(Reporter: yoasif, Assigned: prem.kumar.krishnan, Mentored)

Tracking

(Blocks 1 bug, {good-first-bug})

Trunk
Firefox 69
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 wontfix, firefox68 wontfix, firefox69 verified)

Details

Attachments

(2 attachments)

I logged into Windows on my dual boot machine and launched Firefox. Noticed a sponsored story on the new tab page.

STR:

  1. Enable Sync
  2. Uncheck "Sponsored Stories" in about:preferences > Home > Recommended by Pocket
  3. Create new Firefox profile
  4. Login to same Sync account
  5. Wait for Sync
  6. Check "Sponsored Stories" preference.

What happens:

Sponsored stories is enabled.

Expected result:

Sponsored stories preference should be synced.

Component: New Tab Page → Sync
Blocks: syncmore

Thanks for the suggestion! I agree this does feel like it should sync by default.

IIUC this is a fairly straightforward boolean pref browser.newtabpage.activity-stream.showSponsored, so making it sync might be as simple as adding it to the big list here:

https://dxr.mozilla.org/mozilla-central/rev/5f95b3f2ea44723ba6a8c41a4b27c88032df709f/browser/app/profile/firefox.js#1179

:markh is it any more complicated than that in practice?

Type: defect → enhancement
Flags: needinfo?(markh)

(In reply to Ryan Kelly [:rfkelly] from comment #1)

:markh is it any more complicated than that in practice?

Nope, that's all which is necessary.

Flags: needinfo?(markh)
Mentor: markh
Keywords: good-first-bug
Priority: -- → P3

Hello there, new one here. Can I work on this?

Sure thing, thanks for helping improve Sync! If you haven't already, you can follow this guide to build Firefox. Once you've done that, you'll want to add a line to to this section in browser/app/profile/firefox.js. Those are all the prefs that we sync by default. To add one, you can add an entry for the pref name (comment 1), prefixed with services.sync.prefs.sync.

When you're done, commit your change, and either push your patch to Phabricator for review, or hg export the patch, and attach it to this bug.

Thanks again for working on this, and please let us know if you have questions!

Hi! Let me join this bug.

Recently, I contributed to the Sync functionality and tested synchronization of each new option via Firefox Accounts in Nightly, including this reported bug.
As soon as Firefox 67 released, I tested it one more time and everything worked properly.

Today I tested this particular bug again in a Firefox 67 fresh profile and can confirm that synchronization of Firefox Home options works for me.

All the options are enabled in Sync:
https://searchfox.org/mozilla-central/source/browser/app/profile/firefox.js#1208

Awesome. Thanks :)

Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1490163

I just tested this, it is not fixed. The preference seems to be browser.newtabpage.activity-stream.showSponsored which is not present in mozilla-central/source/browser/app/profile/firefox.js

Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---

(In reply to Asif Youssuff from comment #8)

I just tested this, it is not fixed. The preference seems to be browser.newtabpage.activity-stream.showSponsored which is not present in mozilla-central/source/browser/app/profile/firefox.js

I supposed you mean the "Saved to Pocket" preference in Menu >> Settings >> Home.

What is the purpose of this option (browser.newtabpage.activity-stream.showSponsored) and why I don't see it in the Settings menu but only in about:config?

No, this is the sponsored stories preference as seen in about:preferences#home

It may not be available in your region. I am in the US. See screenshot attached.

Thanks for the clarification, Asif!

So the "Sponsored Stories" checkbox is not synced, but what about "Recommended by Pocket" checkbox? Is it synced?

Would you like to create the patch as described in comment 4? If not, I can take and fix it?

Pushed by mhammond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e3f6a6813aa7
sync sponsored stories preference r=markh
Status: REOPENED → RESOLVED
Closed: 3 months ago2 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Assignee: nobody → prem.kumar.krishnan

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

Flags: qe-verify+

Hello,

I can still reproduce this issue on Fx 69.0b7. I tried to reproduce this issue on the current nightly Fx 70.0a1 Build Id: 20190724095428 and it seems that the issue is fixed in Nightly but not in Beta.

Flags: needinfo?(prem.kumar.krishnan)

Just looked at the source tree. Change has been deployed to Fx 69.0b7

https://searchfox.org/mozilla-beta/source/browser/app/profile/firefox.js#1198

Flags: needinfo?(prem.kumar.krishnan) → needinfo?(markh)

Note that you need to wait until sync has been initialized before changing the pref, otherwise the pref change is not noticed. The easiest way to repro is to 1) sync now, 2) change the pref/option, 3) sync now again - then you can see if it made it to the other device.

Flags: needinfo?(markh) → needinfo?(daniel.cicas)

Hello,

I can conform this issues is fix on Fx 69.0b7. That comment helped, thank you!

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Flags: needinfo?(daniel.cicas)
You need to log in before you can comment on or make changes to this bug.