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!

Matt Stein
  • 4,006
  • 3
  • 26
  • 57
chrisyour
  • 83
  • 5

2 Answers2

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

andrew.welch
  • 11,551
  • 22
  • 31
  • 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 '15 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. – Clive Portman Nov 24 '15 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. – Jonathan Schofield Oct 31 '20 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.

mateostabio
  • 526
  • 4
  • 16