Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use entry model to get ID rather than variable
This fixes an issue where changing the entryType of an existing entry triggers a 500 error: PHP Notice 'yii\base\ErrorException' with message 'Undefined index: entryId' in /Volumes/Sites/Personal/craft3/vendor/craftcms/cms/src/controllers/EntriesController.php:773 Stack trace: #0 … vendor/yiisoft/yii2/base/InlineAction.php(57): craft\controllers\EntriesController->actionSwitchEntryType() #1 … vendor/yiisoft/yii2/base/InlineAction.php(57): ::call_user_func_array:{/Volumes/Sites/Personal/craft3/vendor/yiisoft/yii2/base/InlineAction.php:57}('???', '???') #2 … vendor/yiisoft/yii2/base/Controller.php(156): yii\base\InlineAction->runWithParams('???') #3 … vendor/yiisoft/yii2/base/Module.php(523): yii\base\Controller->runAction('???', '???') #4 … vendor/craftcms/cms/src/web/Application.php(246): yii\base\Module->runAction('???', '???') #5 … vendor/craftcms/cms/src/web/Application.php(385): craft\web\Application->runAction('???', '???') #6 … vendor/craftcms/cms/src/web/Application.php(206): craft\web\Application->_processActionRequest('???') #7 … vendor/yiisoft/yii2/base/Application.php(380): craft\web\Application->handleRequest('???') #8 … web/index.php(33): yii\base\Application->run() #9 {main}
- Loading branch information