Can't save large repeater

Hello. I’ve created a page builder using a repeater and a series of distinct fields by type (displayed via trigger). Upon reaching a certain quantity of elements, I’m no longer able to save. Specifically, I receive the flash message from October stating that the save is complete and I’m automatically redirected to the record list. I’ve already set the field as mediumtext. Do you have any suggestions?

Hi @lorenzo123

This is a limitation in the default configuration in PHP, which defaults to 1000 fields. For larger repeaters, you’ll need to increase this amount by editing your php.ini file or configuration (provided by most hosting providers).

To change the maximum number of input variables allowed, use a text editor to add the max_input_vars directive to your php.ini file. For example, to set the maximum number of input variables to 9000, add the following setting:

max_input_vars = 9000
2 Likes

Thanks! Now I can modify the already existing fields of the repeater. But if I add a new field I get:
“Malformed UTF-8 characters, possibly incorrectly encoded” on line 61 of /root/vendor/laravel/framework/src/Illuminate/Http/Response.php

This looks like a new, possibly unrelated error… Here is a relevant post for this error:

Does this only occur when there are a large number of fields, or, does it happen even if the field count is small?

This would seem to be the only case where this error occurs. I suspect it’s a content issue. I’ll try to check the content.

Solved it!
I had a partial that made a substr with special characters just like the case you shared.
Before:

if (strlen($title) > 60) {
   $title = substr($title, 0, 60) . "...";
}

After:

if (strlen($title) > 60) {
   $title = mb_substr($title, 0, 60) . "...";
}

Awesome!

EDIT
for posterity:
I also set posted to /etc/php/php.ini:

; How many GET/POST/COOKIE input variables may be accepted
;max_input_vars = 1000
max_input_vars = 9000
1 Like

This is a great result. I’m glad to see you got it solved!