#1 June 16, 2016 10:06am

jmason03
Member
Registered: January 9, 2014
Posts: 123

Matrix Field: Too Many Rows

Is there a limit to the amount of entries a nested matrix field can handle. I'm running 4.2.9 and I just tried to update a page with a matrix field that contains another matrix field which has 118 entries within it (each entry has 4 text fields) along with two single text inputs. When I save the page, I lose the last 18 fields from my nested matrix and end up with only 100 and I also lose the data from the two text inputs. If I look in the database, all the JSON is still formatted correctly and everything even appears on the site correctly, except for all the missing data. So I just wanted to check if there is some limit to what the either the json encoding or the matrix field itself can handle?

Offline

#2 June 16, 2016 10:10am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Matrix Field: Too Many Rows

With that many posted fields you may be running up against PHP's max_input_vars value. We ran into it with the nesting of permissions in the user save form and had to end up serializing the data into a single POST input before sending it off to PHP.

Supposedly the max_input_vars parameter is there to prevent some kind of security problems where people will post gigantic datasets and cause segmentation faults but all I know is that it drove me crazy smile

Unfortunately I don't think it's possible to pre-serialize the JSON for matrixes as that would take away the ability to handle images during the page / module saving process.

Offline

#3 June 16, 2016 11:18am

jmason03
Member
Registered: January 9, 2014
Posts: 123

Re: Matrix Field: Too Many Rows

Awesome! Thanks for your help. I increased the number for max_input_vars in my php.ini and that did the trick. Thanks!

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.