dgutov / bmreplace

Quickly replace an existing bookmark in Mozilla Firefox
https://addons.mozilla.org/en-US/firefox/addon/bmreplace/
MIT License
24 stars 3 forks source link

Only updates bookmark titles #40

Closed SLK350 closed 7 years ago

SLK350 commented 7 years ago

When I click on toolbar button for bm replacer it only updates the title of the bookmark not the new url. Been doing this for a few days now using Nightly build 56 x64 windows.

dgutov commented 7 years ago

Thanks for the report, I'm still on beta.

Anything interesting in the error console when this happens?

SLK350 commented 7 years ago

Only update of bookmark title seem to work (after clicking ok to change title). When I try to update both url & title nothing happens, but when I try to update only title it works.

This comes up in error console:

NS_ERROR_ILLEGAL_VALUE: Invalid value for tags

SLK350 commented 7 years ago

Will this extension become an webextension later? Been using it for years and love it.

dgutov commented 7 years ago

NS_ERROR_ILLEGAL_VALUE: Invalid value for tags

Thanks. Does it have a reference to a file and a line?

Alternatively, could you try applying this patch locally? .xpi files are basically zip files; you'll have to edit inside it:

diff --git a/content/bookmarks.js b/content/bookmarks.js
index 05fa01c..002fce5 100644
--- a/content/bookmarks.js
+++ b/content/bookmarks.js
@@ -167,7 +167,7 @@ let bm = {
    */
   replaceBookmark: function(id, url, title, description, usePrivateBrowsing) {
     let oldUri = bms.getBookmarkURI(id),
-        tags = ts.getTagsForURI(oldUri, {}),
+        tags = ts.getTagsForURI(oldUri),
         uri = ios.newURI(url, null, null);
     ts.tagURI(uri, tags);
     ts.untagURI(oldUri, tags);
dgutov commented 7 years ago

Will this extension become an webextension later?

Planning to, yes. I'll probably stay on Firefox 56 for a while, though, until some Tab Groups alternative comes out.

SLK350 commented 7 years ago

Could you send me the new xpi. karl-johan [at] tanno.se

dgutov commented 7 years ago

Sent.

SLK350 commented 7 years ago

Still not working.

dgutov commented 7 years ago

Does the problem occur with every bookmark, or are there particular pages that trigger this?

SLK350 commented 7 years ago

All pages.

dgutov commented 7 years ago

I've just downloaded Firefox 56.0a1 and launched it with a test profile. The bookmarks seem to be moving okay (url included), even those that have tags.

Can you reproduce the problem step by step in an empty profile?

dgutov commented 7 years ago

This is the version I've tried: 56.0a1 (2017-07-13) (64-bit).

SLK350 commented 7 years ago

Tried with a new profile and still wont work. What I tried was:

  1. Go to "https://forums.mydigitallife.net/threads/discussion-windows-10-insider-preview-build-16241-pc.74707/" Page 1 and make a bookmark.
  2. Go to "https://forums.mydigitallife.net/threads/discussion-windows-10-insider-preview-build-16241-pc.74707/page-2" page 2 and click on "Replace Bookmark" toolbar button. Click ok to update bookmark.
  3. When clicking on bookmark afterwards it still goes to page 1 and title still reads "Page 1".

So neither url or name is updated.

If I try to just update the name of the bookmark if it's been changed it will work.

dgutov commented 7 years ago

I can reproduce it, thanks! The problem occurs when the original bookmark has no tags, see https://bugzilla.mozilla.org/show_bug.cgi?id=1376929#c9

If there's no response, I'll fix it in the code anyway.

dgutov commented 7 years ago

I've submitted 1.6.3 for review.