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

Related items limit exceeded due to GET request query length #4264

Closed
christophrumpel opened this issue Sep 15, 2021 · 8 comments · Fixed by #4484
Closed

Related items limit exceeded due to GET request query length #4264

christophrumpel opened this issue Sep 15, 2021 · 8 comments · Fixed by #4484
Assignees

Comments

@christophrumpel
Copy link

christophrumpel commented Sep 15, 2021

Bug Description

When you have a relationship:fieldtype there is currently a limit of related entries to select due to the fact that a GET request is being used to store them.

In our case, the limit was 216, and it failed with trying to add one more. (see screenshot below)

How to Reproduce

  • Use a relationship:fieldtype
  • Select around ~217 entries
  • Click the select button to save
  • See the error

Extra Detail

Given error message:

CleanShot 2021-09-15 at 10 26 04@2x

Selecting the entries:

CleanShot 2021-09-15 at 10 35 36@2x

The issue is similar to #3293, except that we haven't customized any limit. (from what I see)

Environment

Statamic 3.2.4 Pro
Laravel 8.60.0
PHP 8.0.8

Install method (choose one):

  • Fresh install from statamic/statamic
@jasonvarga
Copy link
Member

There's no problem that you're wanting to select so many items, but I am curious what the use case is there.

@christophrumpel
Copy link
Author

I can't tell too much, but it's basically a portal where the client can add items to a city.

@christophrumpel
Copy link
Author

Hey @jasonvarga, I didn't realize you are working at Statamic.

We are currently using Statamic for a bigger application where we often have to deal with a large number of collections, entities, and related items/selections like here in my shown case. We know Statamic is an opinionated backend and that's fine.

We just want to make sure it is the right tool for our use case. If this is something Statamic is not built for, please let us know, because otherwise, we might run into similar issues more often on the way.

@mynetx
Copy link
Contributor

mynetx commented Sep 27, 2021

One could resort to using POST for storing the selection, or to split the GET request into multiple – but I don’t think that second approach would scale too well, since the more selections, the more requests, the longer the user would have to wait.

@jasonvarga
Copy link
Member

It was only a GET route because we were using the CRUD methodology. Changing a route to POST isn't the end of the world.

@christophrumpel
Copy link
Author

Hey @jasonvarga,

  1. are there plans already to fix that?
  2. Regarding my question before: Is this something we will run into in other situations as well when we deal with that amount of items? Are we here working at the limits of Statamic? Again, I don't want to offend anyone here, I just need to know if Statamic is the right tool for us here.

@jasonvarga
Copy link
Member

This is next on @jesseleite's list.

I don't think there's a problem with doing what you're doing. Once it's addressed you can try it out.

@christophrumpel
Copy link
Author

Thanks @jasonvarga.

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

Successfully merging a pull request may close this issue.

4 participants