amteich / kirby-twig

Twig templating support for Kirby CMS
MIT License
48 stars 12 forks source link

Class 'Kirby' not found in kirby-twig/config.php #1

Closed MathiasGmeiner closed 5 years ago

MathiasGmeiner commented 6 years ago

Hey, I tried to install this module on a clean Kirby 3 Beta 6 installation with PHP 7.1

Steps

  1. I installed it with composer, as written in the documentation.
  2. Changed home.php to home.twig an modified the snippets to .twig
  3. Reload of the page

Error:

Fatal error: Uncaught Error: Class 'Kirby' not found in /Users/.../Sites/.../vendor/mgfagency/kirby-twig/config.php on line 5

Have I missed something? #

seehat commented 6 years ago

Hey @MathiasGmeiner, your steps were right.

I think it only currently works with the composer based kirby install. (devkit) This is not intended. Will fix this.

MathiasGmeiner commented 6 years ago

Thanks! In the meantime I try to change my installation to the devkit.

qroac commented 6 years ago

Anything new on how to use this in a non-devkit setup? I'm really interested in this plugin

seehat commented 6 years ago

The problem is this issue: https://github.com/k-next/kirby/issues/762

A workaround is using the devkit for now or with the starterkit manually downloading the repo to the plugin folder and installing composer dependencies inside the plugin.

I will fix this, as soon as there is an official way to go for plugins.

seehat commented 5 years ago

This should be fixed in 1.0.7