Support

Home Forums Event Espresso Premium Max Number of Inputs Warning

Max Number of Inputs Warning

Posted: October 28, 2020 at 2:39 pm


whiscreative

October 28, 2020 at 2:39 pm

Hi
I keep getting this message pop up
I chatted to my host and they increased it to 9500, but I still get the error popping up all the time when I try to edit events.

Thanks


Tony

  • Support Staff

October 29, 2020 at 8:06 am

Hi there,

How many datetimes and tickets do you have on your event?

The error shown above is shown when there are more ‘inputs’ on the current page (the event editor) than your server allows.

What is the full error message shown? It should include a count of the number of inputs on the page and the number of inputs your server allows.


whiscreative

November 3, 2020 at 9:01 pm

HI,
Here is a screenshot of the error. see link below

The event I just tested it on has approx. 50 date/times and 50 tickets, this is only a rough guess as each time i try and count the error pops up and takes me back to the top of the page.

I have chatted to the host and they said they have increased it to 9500, but i still get it

https://drive.google.com/open?id=12362OVPRZ4JvjieNCZ_oOvTGlQX363Rc&authuser=ruth%40whistlercreative.ca&usp=drive_fs


whiscreative

November 3, 2020 at 9:03 pm

The number on the error varies too and this happens on muultiple events, it seems to be happening on them all now


whiscreative

November 3, 2020 at 9:07 pm

I just chatted to the host again and they confirmed its set to 10,000 (not 4,000) like the error says


whiscreative

November 3, 2020 at 9:09 pm

Also to add, when the error shows, if i click away and quickly make an edit to the page (before it pops up again) and press update, it will actually make the change.


whiscreative

November 3, 2020 at 9:11 pm

The host recommended removing and reinstalling the plugin, is this something you suggest? I am worried about loosing all my data


Tony

  • Support Staff

November 4, 2020 at 3:17 am

Ok, first an explanation on what that error means.

max_input_vars is a limit set on your server which basically tells PHP how many ‘input’ elements it should process on a single request. It reads the first X number of inputs it receives in the request and ignores the rest (x being whatever value max_input_vars is set to). Pretty much everything you can add a value to or set a value on is an input (technically that’s a little to general but gives you a rough idea).

There’s a script in Event Espresso that counts the number of inputs on the page and using WP Heartbeat it sends the current input count on the page back to the server in the background.

The count sent over is then compared with the value your server returns for max_input_vars, to pull that we use ini_get('max_input_vars');. The ini_get() function is a PHP function used to pull values from your server config, meaning whatever is returning is from your servers config, not Event Espresso.

So in English, everytime you see that notice pop up, Event Espresso says “There are 234 inputs on this page” to a function specifically used to check the values.

In the background that function says:

“Hey server, how many inputs are allowed?… 1000! Ok great. Thanks.
So the server allows for 1000 inputs.
The current page has 234 inputs.
Is 234 more than 1000? Nope, then carry on, nothing to see.”

(A little while later…)

EE says:
“There are 1234 inputs on this page”

Function says:
“Hey server, how many inputs are allowed?… 1000! Ok great. Thanks.
So the server allows for 1000 inputs.
The current page has 1234 inputs.
Is 1234 more than 1000? Yep, I best tell the user about this!”

We do this because as you add more datetimes/tickets you add more inputs and if they are outside the first X inputs what happens is you create a datetime and/or ticket, set it up so it looks correct but then on save/update it simply disappears (because PHP ignored it), all becuase its own the max_input_vars value.

Also to add, when the error shows, if i click away and quickly make an edit to the page (before it pops up again) and press update, it will actually make the change.

This can mean a couple of things, either…

The input you just changed/added is within the first X number of inputs PHP is processing. (This is common, we’ve seen themes add 14,000 inputs to event single pages in the dashboard but becuase we have the above check you see the error, the default value for max_input_vars on almost every server is 1000, so those will never be processed by default but still trigger EE’s notice).

The value being returns by ini_get() for max_input_vars is completely wrong and its processing all the inputs (I seens this a handful of times, usually from some strange server set up)


Tony

  • Support Staff

November 4, 2020 at 3:25 am

Apologies for the long post but I think it’s important to explain what is happening with the above and to highlight that the value used in the above function is whatever is returned by your server.

However, we can also double-check this within EE itself.

First go to Event Espresso -> Maintenance -> System information

Search for max_input_vars there, what value do you see?

Next, go to Event Espresso -> General Settings.

Make a single change to a setting on that page, say add ‘2’ to the end of Organization Name and hit save.

Now remove the ‘2’ from that field and save again.

That will rebuild the EE_Config can recheck any values set, I doubt this will actually fix the problem but it confirms your config is updated.

The host recommended removing and reinstalling the plugin, is this something you suggest? I am worried about loosing all my data

Again I doubt this will fix the above as it appears that everything is working as it should, there are no ‘errors’ to suggest a problem but the notice is comparing the values it’s given and displaying the notice to the user as expected.

However, all of your event data is stored within the database and de-activating, deleting and re-installing Event Espresso will not remove any of that data. If you want to be safe (and I recommend doing so anyway) create a database backup before you try this.


whiscreative

November 4, 2020 at 10:51 am

Thanks for the explanation, I followed your steps, and the number on the System Info page was 10000 both times (which is what the host set it to)

However… after doing this, I opened some of my event pages back up, and I am not longer getting the pop up message anymore ๐Ÿ™‚


Tony

  • Support Staff

November 4, 2020 at 5:00 pm

Yeah thats odd, although we cache max_input_vars in the config, if the condition is met to trigger the notice we pull the value using ini_get() to confirm first.

So I’m not sure why refreshing the config fixed this for you, but I’m glad it’s now working ๐Ÿ™‚

The support post ‘Max Number of Inputs Warning’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Do NOT follow this link or you will be banned from the site!
[i]
[i]