0

I just upgraded from Craft 2 to 3.6.14 (latest). I was able to successfully to the upgrade. I am able to get into the admin and was even able to install the feed-me plugin. I ported over all the files from the CraftCMS 2 to 3 (in a different folder) including the templates. When I try to hit the '/' URL (base URL), I get Internal Server Error with the following error.

2021-05-14 16:54:35 [-][1][a509bc948c7d5994a4c25b2437cf0413][error][TypeError] TypeError: Argument 1 passed to craft\web\twig\TemplateLoader::_resolveTemplate() must be of the type string, null given, called in /var/www/vendor/craftcms/cms/src/web/twig/TemplateLoader.php on line 72 and defined in /var/www/vendor/craftcms/cms/src/web/twig/TemplateLoader.php:108
Stack trace:
#0 /var/www/vendor/craftcms/cms/src/web/twig/TemplateLoader.php(72): craft\web\twig\TemplateLoader->_resolveTemplate(NULL)
#1 /var/www/vendor/twig/twig/src/Environment.php(299): craft\web\twig\TemplateLoader->getCacheKey(NULL)
#2 /var/www/vendor/twig/twig/src/Environment.php(381): Twig\Environment->getTemplateClass(NULL)
#3 /var/www/vendor/craftcms/cms/src/web/twig/Environment.php(41): Twig\Environment->loadTemplate(NULL, NULL)
#4 /var/www/vendor/twig/twig/src/Environment.php(513): craft\web\twig\Environment->loadTemplate(NULL)
#5 /var/www/vendor/twig/twig/src/Template.php(317): Twig\Environment->resolveTemplate(Array)
#6 /var/www/storage/runtime/compiled_templates/c7/c79cfef91787ef30e09834a18460ca59f19b243431dce3423759312bdef2fce8.php(38): Twig\Template->loadTemplate(Array, '', 1)
#7 /var/www/vendor/twig/twig/src/Template.php(405): __TwigTemplate_31142054de6396a6abc4e01d6b275a8aef55865011e7064f16ec0f90eaa4b945->doDisplay(Array, Array)
#8 /var/www/vendor/twig/twig/src/Template.php(378): Twig\Template->displayWithErrorHandling(Array, Array)
#9 /var/www/vendor/twig/twig/src/Template.php(390): Twig\Template->display(Array)
#10 /var/www/vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array)
#11 /var/www/vendor/twig/twig/src/Environment.php(318): Twig\TemplateWrapper->render(Array)
#12 /var/www/vendor/craftcms/cms/src/web/View.php(389): Twig\Environment->render('', Array)
#13 /var/www/vendor/craftcms/cms/src/web/View.php(450): craft\web\View->renderTemplate('', Array)
#14 /var/www/vendor/craftcms/cms/src/web/Controller.php(257): craft\web\View->renderPageTemplate('', Array, 'site')
#15 /var/www/vendor/craftcms/cms/src/controllers/TemplatesController.php(100): craft\web\Controller->renderTemplate('', Array)
#16 [internal function]: craft\controllers\TemplatesController->actionRender('', Array)
#17 /var/www/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#18 /var/www/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#19 /var/www/vendor/craftcms/cms/src/web/Controller.php(190): yii\base\Controller->runAction('render', Array)
#20 /var/www/vendor/yiisoft/yii2/base/Module.php(534): craft\web\Controller->runAction('render', Array)
#21 /var/www/vendor/craftcms/cms/src/web/Application.php(278): yii\base\Module->runAction('templates/rende...', Array)
#22 /var/www/vendor/yiisoft/yii2/web/Application.php(104): craft\web\Application->runAction('templates/rende...', Array)
#23 /var/www/vendor/craftcms/cms/src/web/Application.php(263): yii\web\Application->handleRequest(Object(craft\web\Request))
#24 /var/www/vendor/yiisoft/yii2/base/Application.php(392): craft\web\Application->handleRequest(Object(craft\web\Request))
#25 /var/www/web/index.php(26): yii\base\Application->run()
#26 {main}

I have tried to look for a solution pretty much everywhere. I have spent over 4 hours looking for a solution. I don't want to individually create entries in the new Craft 3 folder. Any suggestions or tips?

2
  • 1
    When you upgraded to Craft 3, did you follow these instructions and start as if it was a Craft 3 site and then move everything over? craftcms.com/docs/3.x/upgrade.html#performing-the-upgrade Also, in which folder are your templates now? – CraftQuest May 15 at 3:41
  • @CraftQuest Yes. I followed the step-by-step instructions given in that link. The templates folder is the root folder of my project. – Karthik N G May 15 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.