5

I have a matrix with around 75 fields in it. They are spread over multiple "Block Types". When I create a new field and save the matrix, the new fields aren't being saved.

Even worse, when I create a new block type with new fields and then drag it up in the order, when I save, Craft is deleting (trimming) the last fields in the matrix - even though they are old (already created) fields.

Does Craft have a limit on the number of fields in a single matrix?

Thanks for your help!

2 Answers 2

12

This is because of a combination of settings in your php.ini file: max_input_vars & post_max_size, not any limitation in Craft CMS. c.f.:

Matrix field input error from within the control panel

3
  • This solved my problem on my local development environment as well as on Heroku. For anyone interested, you can modify your php.ini settings by placing a file named .user.ini in the public directory.
    – chrisyour
    Nov 23, 2015 at 17:36
  • I regularly have this problem when working locally but never encounter it on any remote servers. Probably because my WAMP default settings are too low. Nov 24, 2015 at 22:02
  • I noticed I hit a limit on extending a Matrix field’s scope which correlated with craft_fields having 255 rows: where 255 was OK but more than 255 was not. 255 seems like a highly significant number, but my max_input_vars was set to 1000, so it’s not clear how 255 relates to 1000. Increasing both max_input_vars and post_max_size worked. Not sure which one made the difference. Oct 31, 2020 at 17:44
2

Just like khalwat said ^^ If you're using MAMP like me, it is in your MAMP Application file MAMP/bin/php/PHP_version_your_using/conf/php.ini

It was a combination of upping both memory_limit & post_max_size to 128M

This did the trick. Hope this saves somebody's time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.