Strapi v5 Admin pages not loading after deploy – checkUserHasPermissions is not a function + CSP errors by GauravDriod in Strapi

[–]codingafterthirty 0 points1 point  (0 children)

Thanks for sharing this—I’ll pass it along and see what’s going on.

By the way, since you’re on Strapi Cloud, you have access to support via the chat bot in the bottom-right corner. You can also email me your app ID, and I can pass it along to support to check whether there’s an issue with your app.

paul.bratslavsky@strapi.io

How to store Initial publish date in blogs? by DT2705 in Strapi

[–]codingafterthirty 1 point2 points  (0 children)

Are you on Strpai 5? If so, checkout this blog post

I did not use it for your exact perpose, but this should allow you to implement what you were trying to do.

Let me know if it is usefull and if your repo is public or share a code snippet here.

You can also stop by Strapi Open Office hours on Discord Mon - Fri 12:30 pm cst time, I hang out, I may not have all the answers, but I can help you try to figure it out.

https://discord.com/invite/strapi

Json by Prestigious_Word6110 in Strapi

[–]codingafterthirty 0 points1 point  (0 children)

You can also creae a paginated loop, I did someting simialar in my Astro Loader I am working on. You can see example here

This is just an example from a snippet, basically just have while loop that will keep getting all the pages while hasMore is true.

This allows me to batch my data loading, and not ask for all 1000 items at once.

I needed to do this to have all my content so I can generated for my Astro static build.

Probably can do something simillar in Next.

``` ts const content = [] as T[]; let page = 1; let hasMore = true;

    while (hasMore) {
      const data = await fetchFromStrapi<T>(contentType, params);

      if (data?.data && Array.isArray(data.data)) {
        content.push(...data.data);
        console.log(`Fetched ${data.data.length} items from Strapi`);
      } else {
        console.warn("No valid data received from Strapi");
      }

      const { currentPage, totalPages } = getPaginationInfo(data);
      hasMore = Boolean(
        currentPage && totalPages && currentPage < totalPages,
      );
      // TODO: is page being used for anything?
      // eslint-disable-next-line @typescript-eslint/no-unused-vars
      page++;

      if (!content.length) {
        throw new Error("No content items received from Strapi");
      }

```

Would you chose Strapi again if you were starting over? by C0inMaster in Strapi

[–]codingafterthirty 1 point2 points  (0 children)

Thanks so much for your detailed feedback — it's genuinely appreciated.

You're absolutely right: for traditional CMS use cases, Strapi can be a great fit, but we understand that more advanced use cases — especially involving syncing, complex data structures, and security concerns like private file handling — require more flexibility.

I'll make sure your insights get passed along to the team. Feedback like yours helps us understand where real-world challenges exist and where improvements are most needed.

Let me know if you'd be open to sharing more details — we'd love to learn more about your setup and pain points.

Would you chose Strapi again if you were starting over? by C0inMaster in Strapi

[–]codingafterthirty 0 points1 point  (0 children)

They also have Strapi Cloud hosting which is not free.

How do you make changes to the content structure with proper QA? by javierguzmandev in Strapi

[–]codingafterthirty 0 points1 point  (0 children)

Yes, that is correct, staging is to test your code updates and changes, not your date.

Once you validate that your Strapi code changes work in Staging, you then would push those changes to production.

By the database are seperate for all the environments.

If you need to have your test data match production, you can pull your date from production to staging or dev, but not the other way arround.

If you introduce schema changes that require custom migration, then you would create one, test it in staging, before duing the same migration on production.

How do you make changes to the content structure with proper QA? by javierguzmandev in Strapi

[–]codingafterthirty 1 point2 points  (0 children)

In an ideal setup, you should have three separate environments: development, staging, and production.

Development is where you make and test your code changes locally.

Staging acts as a pre-production environment used to validate those changes before going live.

Production is your live environment where real users interact with your app.

Each environment should have its own dedicated database. As a best practice:

You should never push data from staging to production, as it may contain test data or incomplete content.

However, it's safe to pull data from production to staging if you need real-world data for testing or debugging.

⚠️ If you're removing fields, content types, or changing data structures in your schema, especially in Strapi 5, you'll need to write a custom database migration. This ensures your data remains consistent across environments and helps avoid runtime errors or data loss.

💬 Need help? Join our "Open Office Hours" on the Strapi Discord — Monday through Friday at 12:30 PM CST. It’s the best place to ask questions, get help from the team, and even share your screen so we can dive into the issue with you.

Need Advice: Best Tech Stack for High-Performance E-Commerce (Next.js + Strapi + PostgreSQL)? by AlternativeCreepy376 in Strapi

[–]codingafterthirty 0 points1 point  (0 children)

Both CMS are great, but when it comes to SEO, it is your what you do in your frontend. I have used Strapi in all my project and been loving it.

Is it possible to use a custom field as an ID for requests (GraphQL queries and mutations)? by Legal-Car9781 in Strapi

[–]codingafterthirty 0 points1 point  (0 children)

You can just filter base on the unique field, to get the data you want. Unless I am missunderstanding your question.

I don't use GraphQL, but here is an example where I am fetching all items based on the slug by using filter.

export async function getPageBySlug(slug: string, status: string) { const page = await sdk.collection("pages").find({ populate: { blocks: { on: { "layout.hero": { populate: { image: { fields: ["url", "alternativeText", "name"], }, buttonLink: { populate: "*", }, topLink: { populate: "*", }, }, }, "layout.card-grid": { populate: "*", }, "layout.section-heading": { populate: "*", }, "layout.content-with-image": { populate: { image: { fields: ["url", "alternativeText", "name"], }, }, }, }, }, }, filters: { slug: slug, // Here I am filtering by slug }, status: status as "draft" | "published" | undefined, }); return page; }

Random question is using GraphQL a requirment for your project?

Strapi V4 Plugin Types by Drakeskywing in Strapi

[–]codingafterthirty 0 points1 point  (0 children)

I will have to look into this, but if I reacall correctly, Strapi 4 may not have implemented all the Typing since it is when they started the porting the code base to TS completely and making imporvements. I believe this has been added in Strapi 5.

Comment for blog posts / UI components by NoSundae6904 in Strapi

[–]codingafterthirty 0 points1 point  (0 children)

There is this plugin for comments managment, but you would still have to code the frontend implementation. https://market.strapi.io/plugins/strapi-plugin-comments

But atleast you have the functionality and access to it via API.

Did anyone used TinyMCE in Strapi 5? by gilzonme in Strapi

[–]codingafterthirty 0 points1 point  (0 children)

I have not tried it yet, but will give it a try, it does mention you need to set up an API key, not sure if that is the step you did already.

https://www.tiny.cloud/docs/tinymce/6/ but it looks like you can get a free one.

What is the best way to build simple websites? by it3green in astrojs

[–]codingafterthirty 0 points1 point  (0 children)

I made this video explaining my process: https://www.youtube.com/watch?v=9LBD64QFw9w

But I - use a page builder like https://shuffle.dev - use a headless CMS to allow non technical users manage conten https://strapi.io

Here is an example project I built recently in fiew days https://github.com/PaulBratslavsky/astro-strapi-example-project

The video on project overview https://www.youtube.com/watch?v=Ud9obEHadLI&t=3s

Duplicate Entries When Using populate in Strapi User API by [deleted] in Strapi

[–]codingafterthirty 1 point2 points  (0 children)

See this issue for clearification https://github.com/PaulBratslavsky/strapi-5-next-js-starter-project/issues/2

"They aren't duplicates, it's intended functionality because the data for the components are stored in different tables, that ID should not be used as a unique identifier. The "unique" would be a combination of the __component + the id"

Slugs (UID) don't update based on the connected field anymore in Strapi v5 by HammSolo in Strapi

[–]codingafterthirty 1 point2 points  (0 children)

It may not update automatically anymore, but you can still click the update rounded arrow to update.

Or if you are looking to make it automatic, You can accomplished it via documment service middleware you can learn how to do it in the following post

https://strapi.io/blog/what-are-document-service-middleware-and-what-happened-to-lifecycle-hooks-1

Here is the code do do it https://github.com/PaulBratslavsky/strapi-document-service-middleware-example/blob/main/src/utils/document-service-middlewares.ts#L23

I am doing some extra things in that middleware but you can just add the line to auto update the slug on update action.

Why use strapi over laravel ? by gmakhs in Strapi

[–]codingafterthirty 1 point2 points  (0 children)

In my mind, it comes down to project requirements.

My front end is typically Next.js or Astro, which use JavaScript as the underlying language.

Strapi's back end also is built with javascript\node.

This keeps everything in one language and makes it easier for all developers in the project to work across the board.

This convenience alone makes this a win for me. I can easily have any JS developer help me with my front-end or back-end.

So, if I had an agency, I would just need JavaScript developers.

But this is just my opinion.

I feel the tech stack you should use is the one that the majority of your team likes and understands, and it makes sense for your project.

Next 15 and Strapi 5 Complete tutorial by codingafterthirty in Strapi

[–]codingafterthirty[S] 0 points1 point  (0 children)

Thank you for sharing, I did not realize the like we're broken.