Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single Type Leads To 404 NotFoundError #20205

Open
simwai opened this issue Apr 25, 2024 · 0 comments
Open

Single Type Leads To 404 NotFoundError #20205

simwai opened this issue Apr 25, 2024 · 0 comments

Comments

@simwai
Copy link

simwai commented Apr 25, 2024

Bug report

Required System information

  • Node.js version: v20.12.2
  • NPM version: 10.5.0
  • Strapi version: 4.24
  • Database: sqlite
  • Operating system: Windows 10
  • Is your project Javascript or Typescript: TS

Describe the bug

I converted a collection type (intro) into a single type. Afterward, I wasn't able to receive the content anymore. I looked through the issues a little bit and saw a similar issue where it could be solved by using populate, which didn't work out for me.

In Postman I tried these calls:
GET http://localhost:13370/api/intro
GET http://localhost:13370/api/intros
GET http://localhost:13370/api/intro?populate=*
GET http://localhost:13370/api/intros?populate=* 

They all failed with that response:
{
  "data": null,
  "error": {
    "status": 404,
    "name": "NotFoundError",
    "message": "Not Found",
    "details": {}
  }
}

I correctly set the permissions and the bearer token, because all requests on collection type work well.

Steps to reproduce the behavior

  1. Go to "Content-Type Builder"
  2. Click on "Create a collection"
  3. Enter test into the "Display name" field
  4. Select "Text" field
  5. Select "Short text"
  6. Enter as name "test"
  7. Click "Finish"
  8. Click "Save"
  9. Wait for reboot
  10. Go to "Content Manager"
  11. Go to collection type "test"
  12. Click "Create new entry"
  13. Enter as value "test"
  14. Click "Edit the model"
  15. Click "Edit"
  16. Switch from "Collection Type" to "Single Type"
  17. Click "Finish"
  18. Wait for reboot
  19. Go to "Content Manager"
  20. Go to single type "test"
  21. Click "Publish"
  22. Go to postman and do the 4 GET calls I mentioned above.
  23. You see 404 NotFoundError on each response.

Expected behavior

I expect to get the data back I entered into the entry of a single type without 404 error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To review
Development

No branches or pull requests

1 participant