Grav-plugin-admin: Issue in installing learn2

Created on 14 Aug 2015  路  6Comments  路  Source: getgrav/grav-plugin-admin

Hi,
I have installed learn2 using admin plugin and using command line, in both cases I had an error after activating the theme from admin panel. Error was:

RuntimeException (404)
HELP
Template "default.html.twig" is not defined ().
Open: /var/www/html/system/src/Grav/Common/Twig/Twig.php
            if ($ext != '.html'.TWIG_EXT) {
                try {
                    $output = $this->twig->render($page->template().'.html'.TWIG_EXT, $twig_vars);
                } catch (\Twig_Error_Loader $e) {
                    throw new \RuntimeException($e->getRawMessage(), 404, $e);
                }
            } else {
                throw new \RuntimeException($e->getRawMessage(), 404, $e);
            }
        }

Full error attached:

screen shot 2015-08-13 at 11 29 19 pm

I did clear the cache after installation with no luck. I have tried using other themes which worked well.
Antimatter v1.7.1
Bootstrap v1.3.2
Mediator v1.0.3

List of installed plugins:

  • Admin Panel v0.3.0
  • Bootstrapper v1.0.1
  • Breadcrumbs v1.3.0
  • Email v0.2.0
  • Error v1.2.2
  • Form v0.2.0
  • Highlight v1.2.0
  • Login v0.2.0
  • Problems v1.1.6
  • Reading Time v1.1.3
  • SocialButtons v1.0.0

Kind Regards,
Oras

question

All 6 comments

Actually this is not a bug. The warning message when you install themes mentions that this is not something to do be done lightly. Each theme may support it's own specific template layouts. Learn2 theme is a very specific theme that does not provide regular 'default' templates, it has templates that are specific to a documentation site.

The best thing to do is to download the "RTFM Skeleton" that includes the learn2 theme, then install the admin plugin on that. The RTFM skeleton already has sample content suited specifically for the learn2 theme.

let me know if you have any further questions.

Hi Andy,
Thank you for your quick reply.
I have actually done that (installing RTFM skeleton) and worked well. Then when I created a page with template "default" it raised the same issue so I guess there is an issue with this particular page template.
All other templates are working fine.

screen shot 2015-08-14 at 12 08 27 am

Default is not supported by learn2, but Default is always provided as an option.

A good suggestion... Read this point...

http://learn.getgrav.org/themes/theme-tutorial#step-6-default-template

Success!

For anyone starting fresh with this theme:

You just need to change the "Page Template" of the Homepage to "Docs" (Screenshot from Admin-Interface) and the front page works:

bildschirmfoto 2017-07-22 um 16 35 42

Great suggestion, thanks!

Was this page helpful?
0 / 5 - 0 ratings