# \#javascript

**URL:** https://community.prismic.io/tag/javascript/32.md

[Latest](https://community.prismic.io/latest.md) · [Categories](https://community.prismic.io/categories.md) · [Tags](https://community.prismic.io/tags.md)

---

## [Sort documents by the newest of two date fields](https://community.prismic.io/t/sort-documents-by-the-newest-of-two-date-fields/20150)

<div class="topic-metadata">

**Author:** [@leopold](https://community.prismic.io/u/leopold)\
**Replies:** 4\
**Last updated:** [March 23, 2026, 8:12pm UTC](https://community.prismic.io/t/sort-documents-by-the-newest-of-two-date-fields/20150 "2026-03-23T20:12:53Z")

</div>

is it possible in Prismic to sort documents (e.g. blog posts) by whichever of two date fields is newer? For example, I have: a publish\_date date field a last\_updated date field What I want is to order results b…

---

## [Key Text Field and Multiple Lines no longer working](https://community.prismic.io/t/key-text-field-and-multiple-lines-no-longer-working/19848)

<div class="topic-metadata">

**Author:** [@victor.efetivos](https://community.prismic.io/u/victor.efetivos)\
**Replies:** 7\
**Last updated:** [September 1, 2025, 9:59pm UTC](https://community.prismic.io/t/key-text-field-and-multiple-lines-no-longer-working/19848 "2025-09-01T21:59:58Z")

</div>

I always used Key Text Field even for multiple lines. And recently, it has not allowed me to do so. Was this field setup changed, or is it a bug?

---

## [Migration API - Failed to create document (custom type)](https://community.prismic.io/t/migration-api-failed-to-create-document-custom-type/19831)

<div class="topic-metadata">

**Author:** [@scholarly\_dev](https://community.prismic.io/u/scholarly_dev)\
**Replies:** 3\
**Last updated:** [June 30, 2025, 8:24am UTC](https://community.prismic.io/t/migration-api-failed-to-create-document-custom-type/19831 "2025-06-30T08:24:13Z")

</div>

Hi, we're unable to create a new document using the migration API for a custom type called "book". Would appreciate the help. 1 - Type was created via Slicemahcine, published to our repo. 2 - Data and fields match, an…

---

## [Caching Document Data in React-Native Application](https://community.prismic.io/t/caching-document-data-in-react-native-application/19789)

<div class="topic-metadata">

**Author:** [@muhammad.umer](https://community.prismic.io/u/muhammad.umer)\
**Replies:** 1\
**Last updated:** [June 10, 2025, 2:59pm UTC](https://community.prismic.io/t/caching-document-data-in-react-native-application/19789 "2025-06-10T14:59:26Z")

</div>

Context I am working on a mobile application in react-native using expo. This application relies on prismic documents for the content to be displayed to users. Everything ranging from the initial splash screen logo to th…

---

## [Prismic preview and toolbar not working](https://community.prismic.io/t/prismic-preview-and-toolbar-not-working/19495)

<div class="topic-metadata">

**Author:** [@klum](https://community.prismic.io/u/klum)\
**Replies:** 2\
**Last updated:** [March 28, 2025, 4:19pm UTC](https://community.prismic.io/t/prismic-preview-and-toolbar-not-working/19495 "2025-03-28T16:19:31Z")

</div>

Describe your question/issue in detail The URL query parameters that were previously sent in the preview URL are no longer present. This causes the cookie 'io.prismic.preview' to no longer be set at the preview destinati…

---

## [NEW SITE: Tropical Water & Well (South Florida, USA)](https://community.prismic.io/t/new-site-tropical-water-well-south-florida-usa/19490)

<div class="topic-metadata">

**Author:** [@epedersen](https://community.prismic.io/u/epedersen)\
**Replies:** 0\
**Last updated:** [March 26, 2025, 4:58pm UTC](https://community.prismic.io/t/new-site-tropical-water-well-south-florida-usa/19490 "2025-03-26T16:58:37Z")

</div>

Hey y'all, I recently took this site live for a client down in South Florida. I run a tiny marketing agency / creative technology studio in Asheville, NC called History of Salad, along with my partner (she's an SEO strat…

---

## [Slow import with migration API](https://community.prismic.io/t/slow-import-with-migration-api/18186)

<div class="topic-metadata">

**Author:** [@gabgabdo](https://community.prismic.io/u/gabgabdo)\
**Replies:** 6\
**Last updated:** [February 17, 2025, 4:23pm UTC](https://community.prismic.io/t/slow-import-with-migration-api/18186 "2025-02-17T16:23:33Z")

</div>

Hello, Following the guide here Migrating to Prismic — Prismic Docs, I've been able to quickly create a script to import 40 document in Prismic. Unfortunately it has been shown to be really slow. The document custom t…

---

## [Disallow indexing of pdf files on CDN](https://community.prismic.io/t/disallow-indexing-of-pdf-files-on-cdn/13607)

<div class="topic-metadata">

**Author:** [@anne.shackelford](https://community.prismic.io/u/anne.shackelford)\
**Replies:** 5\
**Last updated:** [March 7, 2025, 1:26am UTC](https://community.prismic.io/t/disallow-indexing-of-pdf-files-on-cdn/13607 "2025-03-07T01:26:47Z")

</div>

Hello, I am trying to disallow indexing of pdf files. On my website, pdf files can be accessed from multiple pages. They are all stored on the cdn. If I disallow pdf indexing in robots.txt with Disallow: /\*.pdf$, I un…

---

## [getAllByIds not fetching more then 100 documents](https://community.prismic.io/t/getallbyids-not-fetching-more-then-100-documents/18374)

<div class="topic-metadata">

**Author:** [@erik.albinsson](https://community.prismic.io/u/erik.albinsson)\
**Replies:** 10\
**Last updated:** [February 14, 2025, 8:43am UTC](https://community.prismic.io/t/getallbyids-not-fetching-more-then-100-documents/18374 "2025-02-14T08:43:05Z")

</div>

Describe your question/issue in detail Running the function getAllByIds no matter what only returns a max of 100 documents. What steps have you taken to resolve this issue already? I have tried using dangerouslyGetAll w…

---

## [How do I filter my client queries by boolean?](https://community.prismic.io/t/how-do-i-filter-my-client-queries-by-boolean/18280)

<div class="topic-metadata">

**Author:** [@quentingibson94](https://community.prismic.io/u/quentingibson94)\
**Replies:** 3\
**Last updated:** [January 22, 2025, 4:38pm UTC](https://community.prismic.io/t/how-do-i-filter-my-client-queries-by-boolean/18280 "2025-01-22T16:38:34Z")

</div>

Question / Issue I am trying to filter my project so that I only get the ones where the boolean value, "isHome" is true. I know about the client's getAllByType("{customtype}"), but I don't fully understand how to use th…

---

## [Question: Security Review for @prismicio/client 7.12.0 Package](https://community.prismic.io/t/question-security-review-for-prismicio-client-7-12-0-package/18066)

<div class="topic-metadata">

**Author:** [@akshay.jain](https://community.prismic.io/u/akshay.jain)\
**Replies:** 1\
**Last updated:** [November 28, 2024, 11:18am UTC](https://community.prismic.io/t/question-security-review-for-prismicio-client-7-12-0-package/18066 "2024-11-28T11:18:00Z")

</div>

Hello Prismic Team, We are evaluating the feasibility of using the @prismicio/client JavaScript SDK (v7.12.0) in a production environment. Security is a critical aspect of our workflow, and we enforce strict security ch…

---

## [Data rendered by PrismicRichText not working with GSAP](https://community.prismic.io/t/data-rendered-by-prismicrichtext-not-working-with-gsap/13451)

<div class="topic-metadata">

**Author:** [@luke1](https://community.prismic.io/u/luke1)\
**Replies:** 6\
**Last updated:** [November 22, 2024, 12:05pm UTC](https://community.prismic.io/t/data-rendered-by-prismicrichtext-not-working-with-gsap/13451 "2024-11-22T12:05:18Z")

</div>

I'm having a strange issue with PrismicRichText and GSAP animations not working as expected for a Component. Using the below I am able to render the data to the page, but from an animation perspective GSAP can't find th…

---

## [Gridsome w/ @prismicio/client - Missing Loader](https://community.prismic.io/t/gridsome-w-prismicio-client-missing-loader/12776)

<div class="topic-metadata">

**Author:** [@james0r](https://community.prismic.io/u/james0r)\
**Replies:** 1\
**Last updated:** [March 28, 2023, 10:01am UTC](https://community.prismic.io/t/gridsome-w-prismicio-client-missing-loader/12776 "2023-03-28T10:01:28Z")

</div>

Steps: npm i @prismicio/client @prismicio/helpers import \* as prismic from '@prismicio/client' Getting ERROR Failed to compile with 2 errors …

---

## [Article content not updating on route change](https://community.prismic.io/t/article-content-not-updating-on-route-change/17813)

<div class="topic-metadata">

**Author:** [@epedersen](https://community.prismic.io/u/epedersen)\
**Replies:** 2\
**Last updated:** [October 18, 2024, 5:08pm UTC](https://community.prismic.io/t/article-content-not-updating-on-route-change/17813 "2024-10-18T17:08:43Z")

</div>

Hey y'all! I’m currently developing this blog site using Prismic and Nuxt 3 and have encountered an issue where the blog article content doesn’t update correctly when navigating between articles (see next/prev links at …

---

## [PrismicProvider - Cannot use import statement outside a module](https://community.prismic.io/t/prismicprovider-cannot-use-import-statement-outside-a-module/16431)

<div class="topic-metadata">

**Author:** [@dhavalveera](https://community.prismic.io/u/dhavalveera)\
**Replies:** 14\
**Last updated:** [September 26, 2024, 8:35pm UTC](https://community.prismic.io/t/prismicprovider-cannot-use-import-statement-outside-a-module/16431 "2024-09-26T20:35:19Z")

</div>

Impacted feature when trying to import PrismicProvider to the root.tsx file in the Remix App Errors (node:10944) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use \`n…

---

## [PrismicRichText remove \<br\> tags](https://community.prismic.io/t/prismicrichtext-remove-br-tags/16566)

<div class="topic-metadata">

**Author:** [@harry.fischer](https://community.prismic.io/u/harry.fischer)\
**Replies:** 1\
**Last updated:** [August 27, 2024, 8:35am UTC](https://community.prismic.io/t/prismicrichtext-remove-br-tags/16566 "2024-08-27T08:35:14Z")

</div>

I'm trying to work out how to render rich text but without tags. Currently it injects two between each paragraph — Ideally it would render each par in a so I can control spacing with margin. Currently doing this: C…

---

## [Unexpected error on URL when querying Prismic API v2 content in metalsmith?](https://community.prismic.io/t/unexpected-error-on-url-when-querying-prismic-api-v2-content-in-metalsmith/5377)

<div class="topic-metadata">

**Author:** [@niki.brown](https://community.prismic.io/u/niki.brown)\
**Replies:** 9\
**Last updated:** [May 25, 2021, 2:00am UTC](https://community.prismic.io/t/unexpected-error-on-url-when-querying-prismic-api-v2-content-in-metalsmith/5377 "2021-05-25T02:00:41Z")

</div>

Hello I previously posted about running into issue with encountering an Unexpected error on URL when querying Prismic content in metalsmith?\](Unexpected error on URL when querying Prismic content in metalsmith?) I have…

---

## [Switching from Nuxt 2 to Nextjs 14. Is it possible to have a "beta" Nextjs site and for it to work with Prismic Preview?](https://community.prismic.io/t/switching-from-nuxt-2-to-nextjs-14-is-it-possible-to-have-a-beta-nextjs-site-and-for-it-to-work-with-prismic-preview/16147)

<div class="topic-metadata">

**Author:** [@jjames.home](https://community.prismic.io/u/jjames.home)\
**Replies:** 5\
**Last updated:** [June 24, 2024, 8:23am UTC](https://community.prismic.io/t/switching-from-nuxt-2-to-nextjs-14-is-it-possible-to-have-a-beta-nextjs-site-and-for-it-to-work-with-prismic-preview/16147 "2024-06-24T08:23:31Z")

</div>

I am migrating a site from Nuxtjs to Nextjs and would like to have a beta site for it but I want the Prismic Preview on the repo to use the beta site while the NuxtJS site is live. I don't see why this would be a proble…

---

## [How to add javascript script?](https://community.prismic.io/t/how-to-add-javascript-script/16153)

<div class="topic-metadata">

**Author:** [@jrose](https://community.prismic.io/u/jrose)\
**Replies:** 4\
**Last updated:** [June 21, 2024, 6:42am UTC](https://community.prismic.io/t/how-to-add-javascript-script/16153 "2024-06-21T06:42:37Z")

</div>

i did create a Rich text field and write script tag within in, published it and see that (on screen shoot). What i did wrong?

---

## [Using the Assets API to PATCH image data](https://community.prismic.io/t/using-the-assets-api-to-patch-image-data/15519)

<div class="topic-metadata">

**Author:** [@adj](https://community.prismic.io/u/adj)\
**Replies:** 4\
**Last updated:** [June 5, 2024, 3:57pm UTC](https://community.prismic.io/t/using-the-assets-api-to-patch-image-data/15519 "2024-06-05T15:57:50Z")

</div>

Hello, I have reviewed the documentation for the Assets API found here -\> Asset API Technical Reference - Documentation - Prismic, and been able to GET image data, but that's pretty much where it ends. The documentatio…

---

## [Eroor when buidling a Primic Website](https://community.prismic.io/t/eroor-when-buidling-a-primic-website/15781)

<div class="topic-metadata">

**Author:** [@ayenmonasha3](https://community.prismic.io/u/ayenmonasha3)\
**Replies:** 2\
**Last updated:** [April 27, 2024, 12:16am UTC](https://community.prismic.io/t/eroor-when-buidling-a-primic-website/15781 "2024-04-27T00:16:59Z")

</div>

Describe your question/issue in detail When reporting bugs, we recommend you do a recording of your issue with the Jam Chrome plugin: This will give us lots of dev information to help debug your issue. You can remove i…

---

## [The future of Slice Machine](https://community.prismic.io/t/the-future-of-slice-machine/15666)

<div class="topic-metadata">

**Author:** [@jasonhld](https://community.prismic.io/u/jasonhld)\
**Replies:** 4\
**Last updated:** [April 22, 2024, 7:19pm UTC](https://community.prismic.io/t/the-future-of-slice-machine/15666 "2024-04-22T19:19:14Z")

</div>

Are there any plans to make Slice Machine usable without a major framework? Spinning up a shiny new Nuxt site with Slice Machine is all kinds of awesome. But we have a lot of clients who have large existing systems and …

---

## [Installing Prismic on Next.js Project with JavaScript Files](https://community.prismic.io/t/installing-prismic-on-next-js-project-with-javascript-files/15570)

<div class="topic-metadata">

**Author:** [@yanislebzar7](https://community.prismic.io/u/yanislebzar7)\
**Replies:** 1\
**Last updated:** [April 3, 2024, 3:29pm UTC](https://community.prismic.io/t/installing-prismic-on-next-js-project-with-javascript-files/15570 "2024-04-03T15:29:04Z")

</div>

Hello Prismic Community, I'm currently working on setting up Prismic with my Next.js project, but I've encountered some challenges. Is it possible to integrate Prismic with a Next.js project using JavaScript files only…

---

## [Pagination on Custom types](https://community.prismic.io/t/pagination-on-custom-types/14540)

<div class="topic-metadata">

**Author:** [@frontend2](https://community.prismic.io/u/frontend2)\
**Replies:** 5\
**Last updated:** [March 19, 2024, 12:09am UTC](https://community.prismic.io/t/pagination-on-custom-types/14540 "2024-03-19T00:09:51Z")

</div>

I'm trying to create pagination on custom types, trying to set limitations but I see that it limits not exactly my articles, here I add screenshots of my custom type and the data structure that I get from prismic a…

---

## [How to add custom feature like filter to blog app](https://community.prismic.io/t/how-to-add-custom-feature-like-filter-to-blog-app/15474)

<div class="topic-metadata">

**Author:** [@sujitkandekar100](https://community.prismic.io/u/sujitkandekar100)\
**Replies:** 3\
**Last updated:** [March 16, 2024, 12:13pm UTC](https://community.prismic.io/t/how-to-add-custom-feature-like-filter-to-blog-app/15474 "2024-03-16T12:13:43Z")

</div>

i have blog app created there are different types of blog categories when i select a blog category then i should see only same type of blog on home page .example if iuser select entertainment type then user should only s…

---

## [Slice Machine with Content Relaionship: No documents were returned Nextjs](https://community.prismic.io/t/slice-machine-with-content-relaionship-no-documents-were-returned-nextjs/15242)

<div class="topic-metadata">

**Author:** [@solution.stack99](https://community.prismic.io/u/solution.stack99)\
**Replies:** 12\
**Last updated:** [February 13, 2024, 6:19pm UTC](https://community.prismic.io/t/slice-machine-with-content-relaionship-no-documents-were-returned-nextjs/15242 "2024-02-13T18:19:53Z")

</div>

I struggle with building nested navigation, and I have a Layout Slice with content relationship links to reusable custom types. Nav Parent Nav Parent Nav Parent Nav Parent Na…

---

## [Upgrade from prismic-javascript v2 to @prismic/client](https://community.prismic.io/t/upgrade-from-prismic-javascript-v2-to-prismic-client/15140)

<div class="topic-metadata">

**Author:** [@marcus.brunsten](https://community.prismic.io/u/marcus.brunsten)\
**Replies:** 1\
**Last updated:** [January 30, 2024, 11:40am UTC](https://community.prismic.io/t/upgrade-from-prismic-javascript-v2-to-prismic-client/15140 "2024-01-30T11:40:34Z")

</div>

We are currently on a very old version of prismic. I've asked a developer to upgrade, but it seems like the upgrade guides are not available when upgrading from the prismic-javascript npm pack to the "new" @prismic/clie…

---

## [How to type a query with fetchLinks](https://community.prismic.io/t/how-to-type-a-query-with-fetchlinks/15107)

<div class="topic-metadata">

**Author:** [@avaneeshsamsi](https://community.prismic.io/u/avaneeshsamsi)\
**Replies:** 1\
**Last updated:** [January 29, 2024, 4:09pm UTC](https://community.prismic.io/t/how-to-type-a-query-with-fetchlinks/15107 "2024-01-29T16:09:38Z")

</div>

Hello! I have a blog post with a content relationship field of author in it. I have so far been able to query the posts like this const posts = await client.getAllByType("blog\_posts", { fetchLinks: \["authors.name",…

---

## [Prismic conflict with Prettier?](https://community.prismic.io/t/prismic-conflict-with-prettier/14965)

<div class="topic-metadata">

**Author:** [@sebastian.wolf298](https://community.prismic.io/u/sebastian.wolf298)\
**Replies:** 1\
**Last updated:** [January 15, 2024, 11:36am UTC](https://community.prismic.io/t/prismic-conflict-with-prettier/14965 "2024-01-15T11:36:05Z")

</div>

Hey there! For a project of mine, I tried to set it up w/ prismic for the first time. Steps I took so far: Created account -\> created new repo -\> tried to import it into my current project. But unfortunately this does…

---

## [Languages order was changed after updating an document (No longer Master Locale as first index)](https://community.prismic.io/t/languages-order-was-changed-after-updating-an-document-no-longer-master-locale-as-first-index/14852)

<div class="topic-metadata">

**Author:** [@skeleton-support](https://community.prismic.io/u/skeleton-support)\
**Replies:** 5\
**Last updated:** [January 11, 2024, 1:04pm UTC](https://community.prismic.io/t/languages-order-was-changed-after-updating-an-document-no-longer-master-locale-as-first-index/14852 "2024-01-11T13:04:23Z")

</div>

Hello, We're using the same code base for multiple Prismic repos and after making an update in one of our repos (Settings - Global Config), the languages array changed order when getting the information for this repo ca…

[Next page](https://community.prismic.io/tag/javascript/32.md?match_all_tags=true&page=1&tags%5B%5D=javascript)
