the-refinery / workflow

Workflow Plugin for Craft
MIT License
0 stars 1 forks source link

Missing template error when loading dashboard #1

Closed jmcgaha closed 5 years ago

jmcgaha commented 5 years ago

We are using another Craft plugin called Fractal. I don't think it was installed on the version you had but now that it is there is some sort of conflict occurring. It very well may be the fault of Fractal, I'm not sure.

I'm going to disable Workflow for now until we can figure it out. Feel free though to go to 3.staging.lynn.edu/lynnedu_admin and turn Workflow back on, then head to the dashboard to see the error occur.

craft\web\twig\TemplateLoaderException: Unable to find the template “lynn-workflow/_widget/settings”. in /chroot/home/staglynn/3.staging.lynn.edu/vendor/ournameismud/fractal/src/Fractal.php:214
Stack trace:
#0 /chroot/home/staglynn/3.staging.lynn.edu/vendor/ournameismud/fractal/src/Fractal.php(159): ournameismud\fractal\FractalTemplateLoader->_findTemplate('lynn-workflow/_...')
#1 /chroot/home/staglynn/3.staging.lynn.edu/vendor/twig/twig/lib/Twig/Environment.php(270): ournameismud\fractal\FractalTemplateLoader->getCacheKey('lynn-workflow/_...')
#2 /chroot/home/staglynn/3.staging.lynn.edu/vendor/twig/twig/lib/Twig/Environment.php(350): Twig_Environment->getTemplateClass('lynn-workflow/_...')
#3 /chroot/home/staglynn/3.staging.lynn.edu/vendor/craftcms/cms/src/web/twig/Environment.php(40): Twig_Environment->loadTemplate('lynn-workflow/_...', NULL)
#4 /chroot/home/staglynn/3.staging.lynn.edu/vendor/twig/twig/lib/Twig/Environment.php(289): craft\web\twig\Environment->loadTemplate('lynn-workflow/_...')
#5 /chroot/home/staglynn/3.staging.lynn.edu/vendor/craftcms/cms/src/web/View.php(331): Twig_Environment->render('lynn-workflow/_...', Array)
#6 /chroot/home/staglynn/3.staging.lynn.edu/vendor/therefinery/lynnworkflow/src/widgets/Submissions.php(44): craft\web\View->renderTemplate('lynn-workflow/_...', Array)
#7 /chroot/home/staglynn/3.staging.lynn.edu/vendor/craftcms/cms/src/controllers/DashboardController.php(70): therefinery\lynnworkflow\widgets\Submissions->getSettingsHtml()
#8 [internal function]: craft\controllers\DashboardController->actionIndex()
#9 /chroot/home/staglynn/3.staging.lynn.edu/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#10 /chroot/home/staglynn/3.staging.lynn.edu/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#11 /chroot/home/staglynn/3.staging.lynn.edu/vendor/craftcms/cms/src/web/Controller.php(103): yii\base\Controller->runAction('index', Array)
#12 /chroot/home/staglynn/3.staging.lynn.edu/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('index', Array)
#13 /chroot/home/staglynn/3.staging.lynn.edu/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module->runAction('dashboard/index', Array)
#14 /chroot/home/staglynn/3.staging.lynn.edu/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('dashboard/index', Array)
#15 /chroot/home/staglynn/3.staging.lynn.edu/vendor/craftcms/cms/src/web/Application.php(271): yii\web\Application->handleRequest(Object(craft\web\Request))
#16 /chroot/home/staglynn/3.staging.lynn.edu/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#17 /chroot/home/staglynn/3.staging.lynn.edu/html/index.php(21): yii\base\Application->run()
#18 {main}
Copy Stacktrace Search Stackoverflow Search Google Exception
Twig Template Loading Error – craft\web\twig\TemplateLoaderException
Unable to find the template “lynn-workflow/_widget/settings”.
1. in /chroot/home/staglynn/3.staging.lynn.edu/vendor/ournameismud/fractal/src/Fractal.php at line 214
205206207208209210211212213214215216217218219                                }
        }
        else
        {
            $template = Craft::$app->getView()->resolveTemplate($name);
        }
        if (!$template)
        {
            //throw new TemplateLoaderException($name);
            throw new TemplateLoaderException($name, Craft::t('app', 'Unable to find the template “{template}”.', ['template' => $name]));
        }
        return $template;
    }

}
jmcgaha commented 5 years ago

Finding similar errors on other pages as well:

On Craft's plugin page (Settings > Plugins), the workflow plugin includes links for documentation and settings. The documentation link reloads the plugin page. The settings link gives the following error:

Twig Template Loading Error – craft\web\twig\TemplateLoaderException Unable to find the template “lynn-workflow/_layouts” in "lynnworkflow/settings" at line 1.

Clicking the workflow link in the control panel's sidebar produces the following error:

Twig Template Loading Error – craft\web\twig\TemplateLoaderException Unable to find the template “lynn-workflow/_layouts” in "lynnworkflow" at line 2.

phillamb168 commented 5 years ago

Emailed an update, but this error looks to be the fault of Fractal. I am calling my templateFiles in the way specified by the Craft CMS documentation here (https://docs.craftcms.com/v3/extend/updating-plugins.html#rendering-templates) but Fractal appears to be overriding this somehow.

phillamb168 commented 5 years ago

er, nope. Nevermind. I was reading the error messages incorrectly. Working to fix this now.