2

I have a really big / flexible Matrix field for one of my websites. It works great and is easy to handle.

The problem is that I need to add another block containing some fields. I already extenended the php_value max_input_vars to 9000. This worked for a while but I guess I need even more now.

The Matrix field contains 25 blocks with an average of 5 fields per block as of now but, I need to build another one. If I add another block right now the block will stay but If I add a field to the block and save it, it won't appear when reloading the matrix field.

I know it's alot of blocks inside a matrix field but, it actually is really easy to work with.

Now the question is. Is there another way to extend the limit or maybe a better solution?

1 Answer 1

3

There's nothing in Craft limiting the amount of Matrix Blocks and fields you can add, it's purely environmental.

The most common values to increase are max_input_vars, post_max_size and memory_limit, so you'd need to bump one or more of those to higher values to be able to add more.

If you're running things like Suhosin or mod_security, they provide their own additional settings that sit on top of php.ini settings that you might need to adjust as well.

4
  • It actually was environmental as you mentioned. Switched to a new local server but somehow it ignored the settings made in the .htaccess file. Had to change it server sided. Thanks for pointing me that way! Commented Jul 24, 2017 at 8:08
  • I ran into this same issue today. I added 5 fields and it dropped 3 existing fields. Luckily, I was in a development environment. Is there a way to mitigate losing existing fields or to warn the user of possibly losing fields on the roadmap?
    – kotyy
    Commented Oct 25, 2017 at 20:30
  • @kotyy that would be pretty difficult to detect (and be reliable) from PHP.
    – Brad Bell
    Commented Oct 25, 2017 at 23:57
  • @BradBell When saving a Matrix, would serializing the existing fields, appending the newly-created fields reduce the likelihood of dropping an existing field? I noticed in the logs that the POST values were being trimmed from the end. I'd rather lose a new field over an existing field. My two cents.
    – kotyy
    Commented Oct 26, 2017 at 14:57

Your Answer

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

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