<p>Every time I set up a new user user and send the activation link. The user gets the following error when trying to activate their account:</p>

<blockquote>
  <p><strong>Internal Server Error</strong></p>
  
  <p>Undefined Index: action</p>
</blockquote>

<p>The only way to fix it has been to turn on and off the permissions multiple times until it works. Can anyone help fix this problem?</p>

<p><strong>htaccess file</strong></p>

<pre><code>&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
# Send would-be 404 requests to Craft
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
RewriteRule (.+) index.php?p=$1 [QSA,L]
&lt;/IfModule&gt;

## BEGIN Enable GZIP Compression ##
&lt;IfModule mod_deflate.c&gt;
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE image/svg+xml
SetOutputFilter DEFLATE
&lt;/IfModule&gt;
## END Enable GZIP Compression ##


## BEGIN Vary: Accept-Encoding Header ##
&lt;IfModule mod_headers.c&gt;
&lt;FilesMatch "\.(js|css|xml|gz)$"&gt;
Header append Vary: Accept-Encoding
&lt;/FilesMatch&gt;
&lt;/IfModule&gt;
## END Vary: Accept-Encoding Header ##


# 1 Month for most static assets
&lt;filesMatch ".(css|jpg|jpeg|png|gif|js|ico|svg)$"&gt;
Header set Cache-Control "max-age=2592000, public"
&lt;/filesMatch&gt;
</code></pre>

<p>Here's the stack trace:</p>

<pre><code>PHP notice

Undefined index: action

/var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/plugins/limitblocktype/LimitBlockTypePlugin.php(50)

38         }
39 
40         $isAjaxRequest = craft()-&gt;request-&gt;isAjaxRequest();
41         $segments = craft()-&gt;request-&gt;segments;
42         $actionSegment = array_pop($segments) ?: '';
43 
44         if (!$isAjaxRequest) {
45             
46             craft()-&gt;templates-&gt;includeJsResource('limitblocktype/js/limitblocktype.js');
47             
48             // Check request parameters
49             $vars = craft()-&gt;request-&gt;getPost();
50             if (!empty($vars) &amp;&amp; $vars['action'] === 'fields/saveField' &amp;&amp; $vars['type'] === 'Matrix') {
51                 // This is so hacky I don't even
52                 craft()-&gt;runController('limitBlockType/saveField');
53             }
54 
55         }
56 
57         if (!$isAjaxRequest || $actionSegment === 'getEditorHtml') {
58             $data = JsonHelper::encode(craft()-&gt;limitBlockType-&gt;getData());
59             craft()-&gt;templates-&gt;includeJs('if (Craft &amp;&amp; Craft.LimitBlockTypePlugin) { new Craft.LimitBlockTypePlugin('.$data.', '.($isAjaxRequest ? '1' : '0').'); }');
60         }
61 
62     }
Stack Trace
#0  
–  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/etc/web/WebApp.php(687): CApplication-&gt;handleError(8, "Undefined index: action", "/var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/plugins/limit...", 50)
682         if (version_compare(PHP_VERSION, '7', '&gt;=') &amp;&amp; $code === 2 &amp;&amp; strpos($message, 'should be compatible with') !== false)
683         {
684             return;
685         }
686 
687         parent::handleError($code, $message, $file, $line);
688     }
689 
690     // Private Methods
691     // =========================================================================
692 
#1  
–  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/plugins/limitblocktype/LimitBlockTypePlugin.php(50): Craft\WebApp-&gt;handleError(8, "Undefined index: action", "/var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/plugins/limit...", 50, ...)
45             
46             craft()-&gt;templates-&gt;includeJsResource('limitblocktype/js/limitblocktype.js');
47             
48             // Check request parameters
49             $vars = craft()-&gt;request-&gt;getPost();
50             if (!empty($vars) &amp;&amp; $vars['action'] === 'fields/saveField' &amp;&amp; $vars['type'] === 'Matrix') {
51                 // This is so hacky I don't even
52                 craft()-&gt;runController('limitBlockType/saveField');
53             }
54 
55         }
#2  
–  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/services/PluginsService.php(150): Craft\LimitBlockTypePlugin-&gt;init()
145                     $this-&gt;_enabledPlugins[$row['lcHandle']]-&gt;setSettings($row['settings']);
146                 }
147 
148                 foreach ($this-&gt;_enabledPlugins as $plugin)
149                 {
150                     $plugin-&gt;init();
151                 }
152 
153                 $this-&gt;_loadingPlugins = false;
154             }
155 
#3  
+  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/etc/web/WebApp.php(257): Craft\PluginsService-&gt;loadPlugins()
#4  
+  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/framework/base/CApplication.php(185): Craft\WebApp-&gt;processRequest()
#5  
+  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/index.php(62): CApplication-&gt;run()
#6  
+  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/public/index.php(26): require_once("/var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/index.php")
2017-08-08 21:13:32 Apache / Craft CMS 2.6.2988
</code></pre>

CC BY-SA 3.0
2017-05-15T17:25:00.083Z
Have you changed the `actionTrigger` value in a config file? Which version of Craft are you on?
Lindsey D
CC BY-SA 3.0
2017-05-15T18:15:28.630Z
Also, can you edit the original question to share your `.htaccess` file as well?
Brad Bell
CC BY-SA 3.0
2017-05-15T18:22:45.640Z
no the actionTrigger hasn't been changed and am on the most up to date version of Craft 2
mention79
CC BY-SA 3.0
2017-05-15T18:25:02.683Z
Any chance you could reproduce the issue with devMode enabled and share the full stack trace leading up to that error?
Brad Bell
CC BY-SA 3.0
2017-05-15T18:29:07.197Z
Not currently as I can only access it from work unfortunately.
mention79
CC BY-SA 3.0
2017-08-08T21:01:44.193Z
Has anything changed about being able to enable devMode and get a full stack trace for that error?
Brad Bell
CC BY-SA 3.0
2017-08-08T21:03:57.417Z
I can enable mode. How do I show the full stack trace?
mention79
CC BY-SA 3.0
2017-08-08T21:17:19.927Z
Have added full stack trace above. Highlighted line is `if (!empty($vars) && $vars['action'] === 'fields/saveField' && $vars['type'] === 'Matrix') {` from LimitBlockTypePlugin.php
mention79
CC BY-SA 3.0
2017-08-08T21:22:31.880Z
So if you disable this plugin the activation should work. It seems they expect an action key in the $vars variable that is not always there.
kant312
CC BY-SA 3.0
2017-08-08T21:34:55.700Z
That seems to be the issue. LimitBlockTypePlugin was interfering with the password setup. Thanks Brad Bell and kant312. This has been causing me problems for months
mention79
<activation>
New users all get error on activation attempt
# New users all get error on activation attempt

(Asked by: username_0 on 2017-05-15)

Every time I set up a new user user and send the activation link. The user gets the following error when trying to activate their account:

Internal Server Error
Undefined Index: action

The only way to fix it has been to turn on and off the permissions multiple times until it works. Can anyone help fix this problem?
htaccess file

RewriteEngine On
# Send would-be 404 requests to Craft
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
RewriteRule (.+) index.php?p=$1 [QSA,L]


## BEGIN Enable GZIP Compression ##

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE image/svg+xml
SetOutputFilter DEFLATE

## END Enable GZIP Compression ##


## BEGIN Vary: Accept-Encoding Header ##


Header append Vary: Accept-Encoding


## END Vary: Accept-Encoding Header ##


# 1 Month for most static assets

Header set Cache-Control "max-age=2592000, public"


Here's the stack trace:
PHP notice

Undefined index: action

/var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/plugins/limitblocktype/LimitBlockTypePlugin.php(50)

38         }
39 
40         $isAjaxRequest = craft()->request->isAjaxRequest();
41         $segments = craft()->request->segments;
42         $actionSegment = array_pop($segments) ?: '';
43 
44         if (!$isAjaxRequest) {
45             
46             craft()->templates->includeJsResource('limitblocktype/js/limitblocktype.js');
47             
48             // Check request parameters
49             $vars = craft()->request->getPost();
50             if (!empty($vars) && $vars['action'] === 'fields/saveField' && $vars['type'] === 'Matrix') {
51                 // This is so hacky I don't even
52                 craft()->runController('limitBlockType/saveField');
53             }
54 
55         }
56 
57         if (!$isAjaxRequest || $actionSegment === 'getEditorHtml') {
58             $data = JsonHelper::encode(craft()->limitBlockType->getData());
59             craft()->templates->includeJs('if (Craft && Craft.LimitBlockTypePlugin) { new Craft.LimitBlockTypePlugin('.$data.', '.($isAjaxRequest ? '1' : '0').'); }');
60         }
61 
62     }
Stack Trace
#0  
–  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/etc/web/WebApp.php(687): CApplication->handleError(8, "Undefined index: action", "/var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/plugins/limit...", 50)
682         if (version_compare(PHP_VERSION, '7', '>=') && $code === 2 && strpos($message, 'should be compatible with') !== false)
683         {
684             return;
685         }
686 
687         parent::handleError($code, $message, $file, $line);
688     }
689 
690     // Private Methods
691     // =========================================================================
692 
#1  
–  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/plugins/limitblocktype/LimitBlockTypePlugin.php(50): Craft\WebApp->handleError(8, "Undefined index: action", "/var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/plugins/limit...", 50, ...)
45             
46             craft()->templates->includeJsResource('limitblocktype/js/limitblocktype.js');
47             
48             // Check request parameters
49             $vars = craft()->request->getPost();
50             if (!empty($vars) && $vars['action'] === 'fields/saveField' && $vars['type'] === 'Matrix') {
51                 // This is so hacky I don't even
52                 craft()->runController('limitBlockType/saveField');
53             }
54 
55         }
#2  
–  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/services/PluginsService.php(150): Craft\LimitBlockTypePlugin->init()
145                     $this->_enabledPlugins[$row['lcHandle']]->setSettings($row['settings']);
146                 }
147 
148                 foreach ($this->_enabledPlugins as $plugin)
149                 {
150                     $plugin->init();
151                 }
152 
153                 $this->_loadingPlugins = false;
154             }
155 
#3  
+  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/etc/web/WebApp.php(257): Craft\PluginsService->loadPlugins()
#4  
+  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/framework/base/CApplication.php(185): Craft\WebApp->processRequest()
#5  
+  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/index.php(62): CApplication->run()
#6  
+  /var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/public/index.php(26): require_once("/var/www/vhosts/aura.ecwebhub.co.uk/httpdocs/craft/app/index.php")
2017-08-08 21:13:32 Apache / Craft CMS 2.6.2988

**Tags:** activation
> **Comments:**
> **username_1**: Have you changed the `actionTrigger` value in a config file? Which version of Craft are you on?  
> **username_2**: Also, can you edit the original question to share your `.htaccess` file as well?  
> **username_0**: no the actionTrigger hasn't been changed and am on the most up to date version of Craft 2  
> **username_2**: Any chance you could reproduce the issue with devMode enabled and share the full stack trace leading up to that error?  
> **username_0**: Not currently as I can only access it from work unfortunately.  
> **username_2**: Has anything changed about being able to enable devMode and get a full stack trace for that error?  
> **username_0**: I can enable mode. How do I show the full stack trace?  
> **username_0**: Have added full stack trace above. Highlighted line is `if (!empty($vars) && $vars['action'] === 'fields/saveField' && $vars['type'] === 'Matrix') {` from LimitBlockTypePlugin.php  
> **username_3**: So if you disable this plugin the activation should work. It seems they expect an action key in the $vars variable that is not always there.  
> **username_0**: That seems to be the issue. LimitBlockTypePlugin was interfering with the password setup. Thanks Brad Bell and kant312. This has been causing me problems for months  

---

## 0 answers

