"Other bookmarks" node id not always "2"

20 views
Skip to first unread message

richj...@gmail.com

unread,
Nov 9, 2018, 4:27:37 AM11/9/18
to Chromium Extensions
Hi guys,

my extension uses the bookmarks api and assumes that the "Bookmarks bar" node id will always be "1", and the "Other bookmarks" node id will always be "2". However, a number of uses have reported issues that after some investigation lead to the fact that in their profiles, the "Other bookmarks" id has been changed to something other than "2". When they create a new profile the issue goes away. Is this a bug in Chromium, or am I wrong to assume the ids for "Bookmarks bar" and "Other bookmarks" will always be constant?

Thanks,

Rich
Message has been deleted

richj...@gmail.com

unread,
Nov 9, 2018, 4:33:04 AM11/9/18
to Chromium Extensions
Also I forgot to mention, both users who reported this issue were using Chrome on ArchLinux. Could this be platform related?

PhistucK

unread,
Nov 9, 2018, 4:38:36 AM11/9/18
to richj...@gmail.com, Chromium-extensions
The documentation does not seem to mention the IDs (or API constants of them) of those two folders, so I guess counting on them being 1 and 2 is not the right way to go.
Sounds like you should query them at installation time or something like that and store them (or on startup).

The fact that it only happens on that set up (Chromium on ArchLinux) is interesting. If those users use a distribution of Chromium not maintained by Google (unofficially, of course, because Google does not provide official binaries of Chromium), the modified code of that distribution might have a bug (or a feature ;)) somewhere that breaks those assumptions, but that is out of scope for the official Chromium Google groups because the project is not involved in those distributions at all.

PhistucK


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/90125379-b1e6-49ee-8eda-8c9467202e30%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

richj...@gmail.com

unread,
Nov 9, 2018, 10:38:40 AM11/9/18
to Chromium Extensions, richj...@gmail.com
I swear I did see some documentation alluding to the fact the ids are constant, though that would have been years ago now and I can't find anything stating that anymore. So, I think you are correct in that I shouldn't assume the ids to begin with.

However it does seem a bit strange to me that the ids for these nodes would change from their defaults when there is no API to change them...


On Friday, 9 November 2018 09:38:36 UTC, PhistucK wrote:
The documentation does not seem to mention the IDs (or API constants of them) of those two folders, so I guess counting on them being 1 and 2 is not the right way to go.
Sounds like you should query them at installation time or something like that and store them (or on startup).

The fact that it only happens on that set up (Chromium on ArchLinux) is interesting. If those users use a distribution of Chromium not maintained by Google (unofficially, of course, because Google does not provide official binaries of Chromium), the modified code of that distribution might have a bug (or a feature ;)) somewhere that breaks those assumptions, but that is out of scope for the official Chromium Google groups because the project is not involved in those distributions at all.

PhistucK


On Fri, Nov 9, 2018 at 11:33 AM <richj...@gmail.com> wrote:
Also I forgot to mention, both users who reported this issue were using Chrome on ArchLinux. Could this be platform related?

On Friday, 9 November 2018 09:27:37 UTC, richj...@gmail.com wrote:
Hi guys,

my extension uses the bookmarks api and assumes that the "Bookmarks bar" node id will always be "1", and the "Other bookmarks" node id will always be "2". However, a number of uses have reported issues that after some investigation lead to the fact that in their profiles, the "Other bookmarks" id has been changed to something other than "2". When they create a new profile the issue goes away. Is this a bug in Chromium, or am I wrong to assume the ids for "Bookmarks bar" and "Other bookmarks" will always be constant?

Thanks,

Rich

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.

PhistucK

unread,
Nov 9, 2018, 11:53:37 AM11/9/18
to richj...@gmail.com, Chromium-extensions
Well, while no extension API can change them, the browser can do whatever it wants internally. Also, they are just internal constants of the browser, so perhaps the constants themselves (in the code) were changed by the distribution for some reason (which may be a distribution bug).
If someone using Chrome experiences the same issue, that would be grounds for a bug perhaps (though still not promoted as constants, it is reasonable to believe many people depend on them as if they were constants).

PhistucK


On Fri, Nov 9, 2018 at 5:38 PM <richj...@gmail.com> wrote:
I swear I did see some documentation alluding to the fact the ids are constant, though that would have been years ago now and I can't find anything stating that anymore. So, I think you are correct in that I shouldn't assume the ids to begin with.

However it does seem a bit strange to me that the ids for these nodes would change from their defaults when there is no API to change them...

On Friday, 9 November 2018 09:38:36 UTC, PhistucK wrote:
The documentation does not seem to mention the IDs (or API constants of them) of those two folders, so I guess counting on them being 1 and 2 is not the right way to go.
Sounds like you should query them at installation time or something like that and store them (or on startup).

The fact that it only happens on that set up (Chromium on ArchLinux) is interesting. If those users use a distribution of Chromium not maintained by Google (unofficially, of course, because Google does not provide official binaries of Chromium), the modified code of that distribution might have a bug (or a feature ;)) somewhere that breaks those assumptions, but that is out of scope for the official Chromium Google groups because the project is not involved in those distributions at all.

PhistucK


On Fri, Nov 9, 2018 at 11:33 AM <richj...@gmail.com> wrote:
Also I forgot to mention, both users who reported this issue were using Chrome on ArchLinux. Could this be platform related?

On Friday, 9 November 2018 09:27:37 UTC, richj...@gmail.com wrote:
Hi guys,

my extension uses the bookmarks api and assumes that the "Bookmarks bar" node id will always be "1", and the "Other bookmarks" node id will always be "2". However, a number of uses have reported issues that after some investigation lead to the fact that in their profiles, the "Other bookmarks" id has been changed to something other than "2". When they create a new profile the issue goes away. Is this a bug in Chromium, or am I wrong to assume the ids for "Bookmarks bar" and "Other bookmarks" will always be constant?

Thanks,

Rich

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
Reply all
Reply to author
Forward
0 new messages