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

TypeError: Cannot read properties of undefined (reading 'includes') when navigate between two collections #20286

Open
TarasKovalyk opened this issue May 8, 2024 · 4 comments
Assignees
Labels
issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: core:content-manager Source is core/content-manager package status: pending reproduction Waiting for free time to reproduce the issue, or more information

Comments

@TarasKovalyk
Copy link

Bug report

Required System information

  • Node.js version: v18.20.2
  • YARN version: v1.22.19
  • Strapi version: v4.24.0
  • Database: PostgreSql
  • Operating system: Linux
  • Typescript:

Describe the bug

I have 2 collections in Strapi: Content and Comment.
There is relation 'Content belongs to many Comments' added on Content's side
There is another relation 'Content has many Comments' added on the Comment's side.
Everything works fine if there are no comments. However, once I add comment with relation to content and when I navigate from Comment to Content collection there is the following error and white screen:
TypeError: Cannot read properties of undefined (reading 'includes')
message: cancelled

Screenshots

image
image
image

@chhedadhruv
Copy link

@TarasKovalyk Can you provide the steps to reproduce this behaviour?

@TarasKovalyk
Copy link
Author

TarasKovalyk commented May 11, 2024

Hello dear @chhedadhruv
Yes, for sure I can.
So user logs in {baseUrl}/admin

  • when the user is successfully logged in he/she goes to Content Manager
    image
  • user will see the Comment and Content collections (with relation described above)
  • user clicks on Comment
  • users click on Content (a grid with content items is displayed)
  • user clicks on Comment (a grid with comments is loaded and displayed)
  • user clicks on Comment (the described error is happening)
  • only hard refresh (F5 or reload browser page) helps
    Hope it helps you.

@chhedadhruv
Copy link

@TarasKovalyk Thanks for the steps, I gone through the steps and found that when we edit the content type builder and then go to Content Manager in Comments it shows a blank screen with the following error and it shows the page only when it is refreshed
This is the error which I recieved
image

@TarasKovalyk
Copy link
Author

@chhedadhruv do you know how to fix it?

@joshuaellis joshuaellis added issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: core:content-manager Source is core/content-manager package status: pending reproduction Waiting for free time to reproduce the issue, or more information labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: core:content-manager Source is core/content-manager package status: pending reproduction Waiting for free time to reproduce the issue, or more information
Projects
Status: To be reviewed
Status: To review
Development

No branches or pull requests

4 participants