<p>This was a bug and has been resolved in <a href="https://sprout.barrelstrengthdesign.com/craft-plugins/seo" rel="nofollow noreferrer">Sprout SEO</a> v4.0.0-beta.10. You can update via the Plugin Store.</p>

CC BY-SA 4.0
2018-10-29T22:12:31.307Z
When I try to update to the latest version from the plugin store I get an error:
Composer output: Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for barrelstrength/sprout-seo 4.0.0-beta.10 -> satisfiable by barrelstrength/sprout-seo[4.0.0-beta.10].
- barrelstrength/sprout-seo 4.0.0-beta.10 requires barrelstrength/sprout-base ^3.0.10 -> no matching package found.
glider
CC BY-SA 4.0
2018-10-29T22:36:09.217Z
Hey David. Sorry for the trouble. Sometimes our releases take a few hours to get picked up by the Plugin Store. This shouldn't be the norm, but please try again in a few hours. I've reached out to P&T to try to get it resolved.
Ben Parizek
CC BY-SA 4.0
2018-10-29T22:54:28.610Z
@David Should be working now.
Ben Parizek
CC BY-SA 4.0
2018-10-29T23:33:53.407Z
I tried updating but got a new error:
Response: <pre>Exception &#039;Error&#039; with message &#039;Class &#039;barrelstrength\sproutbase\app\import\services\Themes&#039; not found&#039; 

in /home/xxxx/craft3/vendor/barrelstrength/sprout-forms/src/SproutForms.php:198

Stack trace:
#0 /home/xxxx/craft3/vendor/yiisoft/yii2/base/BaseObject.php(109): barrelstrength\sproutforms\SproutForms-&gt;init()
#1 /home/xxxx/craft3/vendor/yiisoft/yii2/base/Module.php(158): yii\base\BaseObject-&gt;__construct(Array)
....
glider
CC BY-SA 4.0
2018-10-29T22:02:25.517Z
2018-10-29T22:02:25.517Z
Ben Parizek
<p>I've got a newly upgraded Craft 3 site. I have one section with a few entry types. However, when attempting to switch to a different entry type I get a JS error: </p>

<p>Failed to load resource: the server responded with a status of 500 () <a href="https://domain.com/index.php?p=admin/actions/entries/switch-entry-type" rel="nofollow noreferrer">https://domain.com/index.php?p=admin/actions/entries/switch-entry-type</a></p>

<p>I've verified the site url and each field in the entry types. </p>

<p>From the yii debugger:</p>

<pre><code> TypeError: Argument 1 passed to craft\services\Elements::getElementById() must be of the type integer, string given, called in /home/xxxx/craft3/vendor/barrelstrength/sprout-seo/src/fields/ElementMetadata.php on line 189 and defined in /home/xxxx/craft3/vendor/craftcms/cms/src/services/Elements.php:174
Stack trace:
#0 /home/xxxx/craft3/vendor/barrelstrength/sprout-seo/src/fields/ElementMetadata.php(189): craft\services\Elements-&gt;getElementById('')
#1 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Extension/Core.php(1619): barrelstrength\sproutseo\fields\ElementMetadata-&gt;getInputHtml(Object(barrelstrength\sproutseo\models\Metadata), Object(craft\elements\Entry))
#2 /home/xxxx/craft3/vendor/craftcms/cms/src/helpers/Template.php(73): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(barrelstrength\sproutseo\fields\ElementMetadata), 'getInputHtml', Array, 'method', false, false)
#3 /home/xxxx/craft3/storage/runtime/compiled_templates/46/46a7b66548802d89cb6e5e9120dba7ea1ad7665705cd35d5875d2f2159ea89b8.php(83): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(barrelstrength\sproutseo\fields\ElementMetadata), 'getInputHtml', Array, 'method')
#4 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_95cfe8b626753c0b28835c72443139945f42ded55602d1a15240c5a71d272740-&gt;doDisplay(Array, Array)
#5 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template-&gt;displayWithErrorHandling(Array, Array)
#6 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(367): craft\web\twig\Template-&gt;displayWithErrorHandling(Array, Array)
#7 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template-&gt;display(Array, Array)
#8 /home/xxxx/craft3/storage/runtime/compiled_templates/ad/ad67eeee9d6a0c49d9fa00e4e63b57f23e8aa6d49bc3e39ca25b08dce15d23f5.php(47): craft\web\twig\Template-&gt;display(Array)
#9 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_81ae65a6f8373ba5cf70bf8aca79f49038baa5a381623bc7b797f2a894a29a1a-&gt;doDisplay(Array, Array)
#10 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template-&gt;displayWithErrorHandling(Array, Array)
#11 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(367): craft\web\twig\Template-&gt;displayWithErrorHandling(Array, Array)
#12 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template-&gt;display(Array, Array)
#13 /home/xxxx/craft3/storage/runtime/compiled_templates/79/79255023f7a23e8fe6f99b0179ae2940e4618e223d8ec3ad853784cf76bfb479.php(59): craft\web\twig\Template-&gt;display(Array)
#14 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_01b4e3e362dd97c023ddf1eecf2e1a873239f75ff1449d71ff06d570334500da-&gt;doDisplay(Array, Array)
#15 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template-&gt;displayWithErrorHandling(Array, Array)
#16 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(367): craft\web\twig\Template-&gt;displayWithErrorHandling(Array, Array)
#17 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template-&gt;display(Array, Array)
#18 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(375): craft\web\twig\Template-&gt;display(Array)
#19 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Environment.php(289): Twig_Template-&gt;render(Array)
#20 /home/xxxx/craft3/vendor/craftcms/cms/src/web/View.php(331): Twig_Environment-&gt;render('entries/_fields', Array)
#21 /home/xxxx/craft3/vendor/craftcms/cms/src/controllers/EntriesController.php(406): craft\web\View-&gt;renderTemplate('entries/_fields', Array)
#22 [internal function]: craft\controllers\EntriesController-&gt;actionSwitchEntryType()
#23 /home/xxxx/craft3/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#24 /home/xxxx/craft3/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction-&gt;runWithParams(Array)
#25 /home/xxxx/craft3/vendor/craftcms/cms/src/web/Controller.php(104): yii\base\Controller-&gt;runAction('switch-entry-ty...', Array)
#26 /home/xxxx/craft3/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller-&gt;runAction('switch-entry-ty...', Array)
#27 /home/xxxx/craft3/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module-&gt;runAction('entries/switch-...', Array)
#28 /home/xxxx/craft3/vendor/craftcms/cms/src/web/Application.php(542): craft\web\Application-&gt;runAction('entries/switch-...', Array)
#29 /home/xxxx/craft3/vendor/craftcms/cms/src/web/Application.php(266): craft\web\Application-&gt;_processActionRequest(Object(craft\web\Request))
#30 /home/xxxx/craft3/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application-&gt;handleRequest(Object(craft\web\Request))
#31 /home/xxxx/dev.xxxx/index.php(23): yii\base\Application-&gt;run()
#32 {main}
</code></pre>

CC BY-SA 4.0
2018-10-22T17:28:47.183Z
Would you mind sharing the stack trace of the error?
Robin Schambach
CC BY-SA 4.0
2018-10-22T18:56:56.797Z
Not sure if this is what you were looking for: 
Unchecked runtime.lastError: The message port closed before a response was received.
jquery.js:9566 POST https://xxxxx.com/index.php?p=admin/actions/entries/switch-entry-type 500
send @ jquery.js:9566
ajax @ jquery.js:9173
postActionRequest @ Craft.js:352
onTypeChange @ EntryTypeSwitcher.js:19
i @ jquery.js:496
(anonymous) @ garnish.js:893
i @ jquery.js:496
dispatch @ jquery.js:5206
v.handle @ jquery.js:5014
glider
CC BY-SA 4.0
2018-10-22T18:58:24.540Z
No I mean the red record in your yii2 debug toolbar with a `error` label, that shows what gone wrong. It lists the exact file and line of the error
Robin Schambach
CC BY-SA 4.0
2018-10-22T19:04:49.770Z
Figured out how to enable that toolbar but it's not showing any errors when I get this error. It shows 201 items as grey but none red. I also checked the Log Messages in the toolbar and nothing shows up under Error or Warning.
glider
CC BY-SA 4.0
2018-10-22T19:08:14.197Z
You need to fully open it in order to see every request and not just the current one. An alternative way is to open your logs in your storage folder
Robin Schambach
CC BY-SA 4.0
2018-10-22T19:24:26.783Z
I did have it fully expanded but saw no error on the page itself. However, I tried visiting the url directly (in my original message) and then saw an error. Placed it in the message above.
glider
CC BY-SA 4.0
2018-10-22T22:09:28.140Z
Looks like a potential bug in Sprout SEO. Might be worth pinging them.
Brad Bell
CC BY-SA 4.0
2018-10-25T17:24:20.090Z
Hi @David I was able to recreate this issue a fix will be available in the next release of Sprout SEO.
Andre L.
<craft3><entry-type><plugin-sproutseo>
Cannot switch entry type
# Cannot switch entry type

(Asked by: username_0 on 2018-10-22)

I've got a newly upgraded Craft 3 site. I have one section with a few entry types. However, when attempting to switch to a different entry type I get a JS error: 
Failed to load resource: the server responded with a status of 500 () https://domain.com/index.php?p=admin/actions/entries/switch-entry-type
I've verified the site url and each field in the entry types. 
From the yii debugger:
 TypeError: Argument 1 passed to craft\services\Elements::getElementById() must be of the type integer, string given, called in /home/xxxx/craft3/vendor/barrelstrength/sprout-seo/src/fields/ElementMetadata.php on line 189 and defined in /home/xxxx/craft3/vendor/craftcms/cms/src/services/Elements.php:174
Stack trace:
#0 /home/xxxx/craft3/vendor/barrelstrength/sprout-seo/src/fields/ElementMetadata.php(189): craft\services\Elements->getElementById('')
#1 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Extension/Core.php(1619): barrelstrength\sproutseo\fields\ElementMetadata->getInputHtml(Object(barrelstrength\sproutseo\models\Metadata), Object(craft\elements\Entry))
#2 /home/xxxx/craft3/vendor/craftcms/cms/src/helpers/Template.php(73): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(barrelstrength\sproutseo\fields\ElementMetadata), 'getInputHtml', Array, 'method', false, false)
#3 /home/xxxx/craft3/storage/runtime/compiled_templates/46/46a7b66548802d89cb6e5e9120dba7ea1ad7665705cd35d5875d2f2159ea89b8.php(83): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(barrelstrength\sproutseo\fields\ElementMetadata), 'getInputHtml', Array, 'method')
#4 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_95cfe8b626753c0b28835c72443139945f42ded55602d1a15240c5a71d272740->doDisplay(Array, Array)
#5 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#6 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#7 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#8 /home/xxxx/craft3/storage/runtime/compiled_templates/ad/ad67eeee9d6a0c49d9fa00e4e63b57f23e8aa6d49bc3e39ca25b08dce15d23f5.php(47): craft\web\twig\Template->display(Array)
#9 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_81ae65a6f8373ba5cf70bf8aca79f49038baa5a381623bc7b797f2a894a29a1a->doDisplay(Array, Array)
#10 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#11 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#12 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#13 /home/xxxx/craft3/storage/runtime/compiled_templates/79/79255023f7a23e8fe6f99b0179ae2940e4618e223d8ec3ad853784cf76bfb479.php(59): craft\web\twig\Template->display(Array)
#14 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_01b4e3e362dd97c023ddf1eecf2e1a873239f75ff1449d71ff06d570334500da->doDisplay(Array, Array)
#15 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#16 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#17 /home/xxxx/craft3/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#18 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Template.php(375): craft\web\twig\Template->display(Array)
#19 /home/xxxx/craft3/vendor/twig/twig/lib/Twig/Environment.php(289): Twig_Template->render(Array)
#20 /home/xxxx/craft3/vendor/craftcms/cms/src/web/View.php(331): Twig_Environment->render('entries/_fields', Array)
#21 /home/xxxx/craft3/vendor/craftcms/cms/src/controllers/EntriesController.php(406): craft\web\View->renderTemplate('entries/_fields', Array)
#22 [internal function]: craft\controllers\EntriesController->actionSwitchEntryType()
#23 /home/xxxx/craft3/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#24 /home/xxxx/craft3/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#25 /home/xxxx/craft3/vendor/craftcms/cms/src/web/Controller.php(104): yii\base\Controller->runAction('switch-entry-ty...', Array)
#26 /home/xxxx/craft3/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('switch-entry-ty...', Array)
#27 /home/xxxx/craft3/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module->runAction('entries/switch-...', Array)
#28 /home/xxxx/craft3/vendor/craftcms/cms/src/web/Application.php(542): craft\web\Application->runAction('entries/switch-...', Array)
#29 /home/xxxx/craft3/vendor/craftcms/cms/src/web/Application.php(266): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#30 /home/xxxx/craft3/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#31 /home/xxxx/dev.xxxx/index.php(23): yii\base\Application->run()
#32 {main}

**Tags:** craft3, entry-type, plugin-sproutseo

> **Comments:**
> **username_1**: Would you mind sharing the stack trace of the error?  
> **username_0**: Not sure if this is what you were looking for:  Unchecked runtime.lastError: The message port closed before a response was received. jquery.js:9566 POST https://xxxxx.com/index.php?p=admin/actions/entries/switch-entry-type 500 send @ jquery.js:9566 ajax @ jquery.js:9173 postActionRequest @ Craft.js:352 onTypeChange @ EntryTypeSwitcher.js:19 i @ jquery.js:496 (anonymous) @ garnish.js:893 i @ jquery.js:496 dispatch @ jquery.js:5206 v.handle @ jquery.js:5014  
> **username_1**: No I mean the red record in your yii2 debug toolbar with a `error` label, that shows what gone wrong. It lists the exact file and line of the error  
> **username_0**: Figured out how to enable that toolbar but it's not showing any errors when I get this error. It shows 201 items as grey but none red. I also checked the Log Messages in the toolbar and nothing shows up under Error or Warning.  
> **username_1**: You need to fully open it in order to see every request and not just the current one. An alternative way is to open your logs in your storage folder  
> **username_0**: I did have it fully expanded but saw no error on the page itself. However, I tried visiting the url directly (in my original message) and then saw an error. Placed it in the message above.  
> **username_2**: Looks like a potential bug in Sprout SEO. Might be worth pinging them.  
> **username_3**: Hi @David I was able to recreate this issue a fix will be available in the next release of Sprout SEO.  

---

## 1 answers

### Answer by username_4 on 2018-10-29. Score: 1

This was a bug and has been resolved in [Sprout SEO](https://sprout.barrelstrengthdesign.com/craft-plugins/seo) v4.0.0-beta.10. You can update via the Plugin Store.

> **Comments:**
> **username_0**: When I try to update to the latest version from the plugin store I get an error: Composer output: Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.  Problem 1 - Installation request for barrelstrength/sprout-seo 4.0.0-beta.10 -> satisfiable by barrelstrength/sprout-seo[4.0.0-beta.10]. - barrelstrength/sprout-seo 4.0.0-beta.10 requires barrelstrength/sprout-base ^3.0.10 -> no matching package found.  
> **username_4**: Hey David. Sorry for the trouble. Sometimes our releases take a few hours to get picked up by the Plugin Store. This shouldn't be the norm, but please try again in a few hours. I've reached out to P&T to try to get it resolved.  
> **username_4**: @David Should be working now.  
> **username_0**: I tried updating but got a new error: Response: <pre>Exception &#039;Error&#039; with message &#039;Class &#039;barrelstrength\sproutbase\app\import\services\Themes&#039; not found&#039;   in /home/xxxx/craft3/vendor/barrelstrength/sprout-forms/src/SproutForms.php:198  Stack trace: #0 /home/xxxx/craft3/vendor/yiisoft/yii2/base/BaseObject.php(109): barrelstrength\sproutforms\SproutForms-&gt;init() #1 /home/xxxx/craft3/vendor/yiisoft/yii2/base/Module.php(158): yii\base\BaseObject-&gt;__construct(Array) ....  

---

