Giter Site home page Giter Site logo

Comments (6)

V1c70r avatar V1c70r commented on September 3, 2024

I return to version 2.3. It works correctly.

from auto-sort-bookmarks-webext.

V1c70r avatar V1c70r commented on September 3, 2024

2.3 doesn't work too. Screw you guys, I'm going Chrome!

from auto-sort-bookmarks-webext.

digitalcircuit avatar digitalcircuit commented on September 3, 2024

Using the latest version from the Mozilla Addons site (2.7.1), I run into a similar issue. Bookmarks and folders will not sort after clicking "Sort Bookmarks" in in the Bookmarks menu. After investigating the local addon .xpi in my Firefox profile, it appears that the problematic code is in bookmark-sorter.js on line 85

19:48:16.236 TypeError: bookmark1[BookmarkSorter.prototype.firstSortCriteria] is null
Stack trace:
BookmarkSorter<.compare@resource://gre/modules/commonjs/toolkit/loader.js -> resource://sortbookmarks-at-bouanto/autosortbookmarks/lib/bookmark-sorter.js:54:13
BookmarkSorter<.sortFolder@resource://gre/modules/commonjs/toolkit/loader.js -> resource://sortbookmarks-at-bouanto/autosortbookmarks/lib/bookmark-sorter.js:158:13
BookmarkSorter<.sortAndSave@resource://gre/modules/commonjs/toolkit/loader.js -> resource://sortbookmarks-at-bouanto/autosortbookmarks/lib/bookmark-sorter.js:138:13
BookmarkSorter<.sortFolders/this.thread<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://sortbookmarks-at-bouanto/autosortbookmarks/lib/bookmark-sorter.js:195:25
Thread<.execute@resource://gre/modules/commonjs/toolkit/loader.js -> resource://sortbookmarks-at-bouanto/autosortbookmarks/lib/thread.js:35:44
Thread<.execute/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://sortbookmarks-at-bouanto/autosortbookmarks/lib/thread.js:37:17
notify@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/timers.js:40:9
waitForSyncCallback@resource://services-common/async.js:102:7
querySpinningly@resource://services-common/async.js:201:12
GUIDForId@resource://gre/modules/services-sync/engines/bookmarks.js:1162:18
BStore_getChildren@resource://gre/modules/services-sync/engines/bookmarks.js:1241:1
BStore_getChildren@resource://gre/modules/services-sync/engines/bookmarks.js:1242:11
BStore_getChildren@resource://gre/modules/services-sync/engines/bookmarks.js:1242:11
BStore_getChildren@resource://gre/modules/services-sync/engines/bookmarks.js:1242:11
BStore_getAllIDs@resource://gre/modules/services-sync/engines/bookmarks.js:1301:9
_buildGUIDMap@resource://gre/modules/services-sync/engines/bookmarks.js:246:22
_syncStart/<@resource://gre/modules/services-sync/engines/bookmarks.js:390:19
_mapDupe@resource://gre/modules/services-sync/engines/bookmarks.js:330:9
_createRecord@resource://gre/modules/services-sync/engines/bookmarks.js:430:17
SyncEngine.prototype._uploadOutgoing@resource://services-sync/engines.js:1451:21
SyncEngine.prototype._sync@resource://services-sync/engines.js:1522:7
wrappedSync@resource://gre/modules/services-sync/engines/bookmarks.js:229:11
_sync@resource://gre/modules/services-sync/engines/bookmarks.js:226:1
WrappedNotify@resource://services-sync/util.js:148:21
Engine.prototype.sync@resource://services-sync/engines.js:668:5
_syncEngine@resource://services-sync/stages/enginesync.js:199:7
sync@resource://services-sync/stages/enginesync.js:149:15
onNotify@resource://gre/modules/services-sync/service.js:1295:7
WrappedNotify@resource://services-sync/util.js:148:21
WrappedLock@resource://services-sync/util.js:103:16
_lockedSync@resource://gre/modules/services-sync/service.js:1285:12
sync/<@resource://gre/modules/services-sync/service.js:1277:14
WrappedCatch@resource://services-sync/util.js:77:16
sync@resource://gre/modules/services-sync/service.js:1265:5
1 timers.js:43

from auto-sort-bookmarks-webext.

digitalcircuit avatar digitalcircuit commented on September 3, 2024

Aha! It seems Auto-Sort Bookmarks breaks whenever the "title" (or whatever is chosen as sort criteria) of a bookmark is null, e.g. the "Name" field in the Firefox bookmarks manager has no content. I found this by setting a conditional breakpoint in bookmark-sorter.js on line 85, with the condition of bookmark1[BookmarkSorter.prototype.firstSortCriteria] == null.

There needs to be a check for null values. If found, that should result in either comparing by URL or skipping doing anything with the bookmark at all. I don't think this is supposed to be able to happen as Firefox automatically filled in the "title" of the bookmarks whenever I opened the URLs in a new tab from the bookmark manager.

In the meantime, you can work around the problem by setting the conditional breakpoint above to find the broken bookmarks, then filling in the "Name" field on any that are missing it. You may have to enable Add-on Debugging by doing the following: open the developer tools, go to the settings and enable chrome debugging and remote debugging. Once they are on you can find debug buttons for add-ons in the Add-ons Manager.

After correcting 7 or so corrupted bookmarks, Auto-Sort Bookmarks works once again!

from auto-sort-bookmarks-webext.

Gitoffthelawn avatar Gitoffthelawn commented on September 3, 2024

Nice job!

from auto-sort-bookmarks-webext.

antoyo avatar antoyo commented on September 3, 2024

Fixed in version 2.8.

from auto-sort-bookmarks-webext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.