<p>This ended up being an environmental issue with semi-largish Matrix fields.</p>

<p>The three most common culprits are your php.ini file's <a href="https://secure.php.net/manual/en/info.configuration.php#ini.max-input-vars" rel="nofollow noreferrer">max_input_vars</a>, <a href="https://secure.php.net/manual/en/info.configuration.php#ini.max-input-nesting-level" rel="nofollow noreferrer">max_input_nesting_level</a> and <a href="https://secure.php.net/manual/en/ini.core.php#ini.post-max-size" rel="nofollow noreferrer">post_max_size</a> would would need to be adjusted upwards, but other settings might come into play depending on your environment an Matrix configuration.</p>

<p>Also, if your server is running anything like <a href="https://www.modsecurity.org/" rel="nofollow noreferrer">mod_security</a> or <a href="https://suhosin.org/stories/index.html" rel="nofollow noreferrer">Suhosin</a>, they have additional settings that might need to be adjusted higher that could affect this.</p>

CC BY-SA 3.0
2018-01-04T19:16:44.510Z
2018-01-04T19:16:44.510Z
Brad Bell
<p>Hi I was trying to save the matrix field and got the error:
"Internal Server Error</p>

<p>Undefined index: handle"</p>

<p>I checked out all fields' handles and they are all in place.</p>

<p>Is there any reason causing the error?
<img src="https://i.sstatic.net/CQWq0.png" alt="enter image description here"></p>

<p>Thank you!</p>

<p><img src="https://i.sstatic.net/3RD79.png" alt="enter image description here"></p>

CC BY-SA 3.0
2014-12-24T22:10:07.203Z
Can you find that error in your `craft/storage/runtime/logs` folder and post the full stack trace leading up to it? Alternatively, you can enable devMode (http://buildwithcraft.com/docs/config-settings#devMode), reproduce the error and get the stack trace in your browser.
Brad Bell
CC BY-SA 3.0
2015-01-05T16:11:22.990Z
Thank you for replying, I uploaded the errors with devMode on. Hope it helps to explain the problems I've got. Thank you!
Yulu
CC BY-SA 3.0
2015-01-05T16:26:16.910Z
It's hard to tell which Matrix field it's complaining about from the stack trace, but can you try going through each of your Matrix field settings pages and re-saving their settings and see if the error goes away?
Brad Bell
CC BY-SA 3.0
2015-01-05T16:58:06.950Z
I went inside each matrix field settings and resaved them (no errors came up), but still got the same error when save the whole matrix.
Yulu
CC BY-SA 3.0
2015-01-05T17:03:57.250Z
I thought it could be the matrix fields maximum number reached, so I tried to delete one block type. And I received a "type" error on saving as newly attached in the post.
Yulu
CC BY-SA 3.0
2015-01-05T18:15:18.867Z
Yeah, something seems jacked up with your setup.  Can you submit a ticket from your dashboard's Get Help widget and let it send along a db backup along with log files?  Also, point us to an entry and Matrix field where we can try to reproduce what you're seeing.
Brad Bell
CC BY-SA 3.0
2015-06-17T05:52:15.280Z
Just had the same issue adding a field to matrix block...
Bowenac
CC BY-SA 3.0
2015-02-02T11:18:00.257Z
I'm having the same issue when creating a field in a matrix. Was there any luck resolving this?
Christopher Healey
<matrix><database><server>
Get "Internal Server Error Undefined index: handle"
# Get "Internal Server Error Undefined index: handle"

(Asked by: username_0 on 2014-12-24)

Hi I was trying to save the matrix field and got the error:
"Internal Server Error

Undefined index: handle"

I checked out all fields' handles and they are all in place.

Is there any reason causing the error?
![enter image description here](https://i.sstatic.net/CQWq0.png)

Thank you!

![enter image description here](https://i.sstatic.net/3RD79.png)

**Tags:** matrix, database, server
> **Comments:**
> **username_1**: Can you find that error in your `craft/storage/runtime/logs` folder and post the full stack trace leading up to it? Alternatively, you can enable devMode (http://buildwithcraft.com/docs/config-settings#devMode), reproduce the error and get the stack trace in your browser.  
> **username_0**: Thank you for replying, I uploaded the errors with devMode on. Hope it helps to explain the problems I've got. Thank you!  
> **username_1**: It's hard to tell which Matrix field it's complaining about from the stack trace, but can you try going through each of your Matrix field settings pages and re-saving their settings and see if the error goes away?  
> **username_0**: I went inside each matrix field settings and resaved them (no errors came up), but still got the same error when save the whole matrix.  
> **username_0**: I thought it could be the matrix fields maximum number reached, so I tried to delete one block type. And I received a "type" error on saving as newly attached in the post.  
> **username_1**: Yeah, something seems jacked up with your setup.  Can you submit a ticket from your dashboard's Get Help widget and let it send along a db backup along with log files?  Also, point us to an entry and Matrix field where we can try to reproduce what you're seeing.  
> **username_3**: I'm having the same issue when creating a field in a matrix. Was there any luck resolving this?  
> **username_2**: Just had the same issue adding a field to matrix block...  

---

## 1 answers

### Answer by username_1 on 2018-01-04. Score: 2

This ended up being an environmental issue with semi-largish Matrix fields.

The three most common culprits are your php.ini file's [max\_input\_vars](https://secure.php.net/manual/en/info.configuration.php#ini.max-input-vars), [max\_input\_nesting\_level](https://secure.php.net/manual/en/info.configuration.php#ini.max-input-nesting-level) and [post\_max\_size](https://secure.php.net/manual/en/ini.core.php#ini.post-max-size) would would need to be adjusted upwards, but other settings might come into play depending on your environment an Matrix configuration.

Also, if your server is running anything like [mod\_security](https://www.modsecurity.org/) or [Suhosin](https://suhosin.org/stories/index.html), they have additional settings that might need to be adjusted higher that could affect this.


---

