Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching from Bookmarks to ManagedBookmarks duplicates bookmarks #817

Closed
bastux opened this issue Nov 11, 2021 · 3 comments
Closed

Switching from Bookmarks to ManagedBookmarks duplicates bookmarks #817

bastux opened this issue Nov 11, 2021 · 3 comments

Comments

@bastux
Copy link

bastux commented Nov 11, 2021

I don't know if this is solveable though, since there was no distinction between those two in the past. Would it be an idea to remove all of those bookmarks, where location (folder), url and name match those in ManageBookmarks?

Test Case (Firefox ESR 91.3 using policies.json, Windows):
Use the following config:

{
  "policies": {
    "DisplayBookmarksToolbar": true,
    "Bookmarks": [
      {
        "Folder": "Test",
        "Placement": "toolbar",
        "Title": "Google",
        "URL": "https://www.google.de/"
      },
      {
        "Folder": "Test",
        "Placement": "toolbar",
        "Title": "Youtube",
        "URL": "https://www.youtube.com/"
      }
    ]
  }
}

Start Firefox with a fresh profile
Migrate the config to ManagedBookmarks

{
  "policies": {
    "DisplayBookmarksToolbar": true,
    "ManagedBookmarks": [
      {
        "toplevel_name": "Test"
      },
      {
        "name": "Google",
        "url": "https://www.google.de/"
      },
      {
        "name": "Youtube",
        "url": "https://www.youtube.com/"
      }
    ]
  }
}

Restart Firefox with the same profile

This and the issue ManagedBookmarks don't use favicons #816 let me stick to Bookmarks right now.

@mkaply
Copy link
Collaborator

mkaply commented Nov 11, 2021

I could probably add a specific policy to remove Bookmarks or specifying an empty Bookmarks policy removes them.

@mkaply
Copy link
Collaborator

mkaply commented Nov 16, 2021

So if you specify [] for the bookmarks, they will be deleted. There's no way for that to work for GPO though.

I'm going to add a way to do that.

I'm working on your other bugs.

@bastux
Copy link
Author

bastux commented Nov 24, 2021

This seems to do the trick, thank you very much for your effort! It already worked and I double-checked, that only the bookmarks set through the policy are removed that way:

  1. Started with Bookmarks policy set
  2. Started Firefox with a fresh profile, created Folder Test2, copied all bookmarks over to that folder and closed Firefox
  3. Emptied Bookmarks policy, (set ManagedBookmarks)
    "Bookmarks": []
  4. Reopen Firefox

-> user-defined bookmarks in Test2 are still there
-> no bookmarks defined through Bookmarks policy
(-> bookmarks defined through ManagedBookmarks are set)

@mkaply mkaply closed this as completed in b23a559 Nov 29, 2021
mkaply added a commit that referenced this issue Nov 29, 2021
Add support for emptying bookmarks. Fixes #817.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants