Deprecation of Bookmarks and Collections

Describe your question/issue in detail

We recently took over this project from someone else and haven’t used Prismic before. The article FAQ: Deprecation of Bookmarks and Collections does not provide guidelines on how to check if bookmarks were used in our project.

It would be much more helpful if the documentation included examples of how bookmarks were used in the past. With such examples, we could follow a structured approach to inspect our code and determine whether bookmarks were implemented.

Hi @aaron.sun ,

Welcome to the community!

Thanks for reaching out! Since this is an older project, one way to check if bookmarks were used is by looking at the age of the repository. Bookmarks were deprecated quite some time ago, so if your repository is relatively new, it’s unlikely that bookmarks were implemented.

Additionally, if your project uses UIDs for content retrieval, it likely doesn’t rely on bookmarks, as they served a similar purpose in older setups.

Each project can be different, though, so we’d be happy to help you check! If you can share some query examples from your project, we can assist in determining whether bookmarks were used and guide you on how to transition if needed.

Let us know how you’d like to proceed!

Hi Phil,
thanks for your reply, here are some of our query examples:

prismic.query('[[:d = at(document.type, "address-search")]]]')

prismic.query(
            prismic.predicates.at('document.type', 'plan-detail'),
            prismic.predicates.fulltext('my.plan-detail.plan_id', planId)
          )

Hi again Aaron,

I think it's save to say you're not using bookmarks or collections then.

What techonology is your project built in? What's the repo name?

Hi,
We are Bigpipe from Spark.

Hi Aaron,

The age of your repo (2014) could mean these might be used, but from the queries you've shared there's no use of bookmarks.

You might want to do a quick search through your codebase for any instances of:

  • getBookmark()
  • form()
  • Any usage of the bookmarks attribute from the API response

If you don't find any of these, you can be confident that the deprecation won't affect your current implementation.

Thanks.

Hi Phil,
I did not find anything with the bookmarks, but I did find an API with a form like this:

 function doQueryPage(query, page, results, defer) {
      getPrismic()
        .then(function(prismic) {
          prismic.api.form('everything')
            .query(query)
            .ref(prismic.ref)
            .pageSize(100)
            .page(page)
            .submit(function(err, docs) {
              if (err) {
                defer.reject(new Error(err));
              } else {
                results = results.concat(docs.results);

                if (++page <= docs.total_pages) {
                  doQueryPage(query, page, results, defer);
                } else {
                  defer.resolve(_.groupBy(results, 'type'));
                }
              }
            });
        });

so, do we need change anything ?

Hey Aaron,

No this is fine, as shown in the FAQ, using 'everything' will still work:

:slight_smile: