Open johannesfosseus opened 10 years ago
Do you have any additional information? Like what fatal error was triggered? Did you install twig through composer before trying to activate the extension?
I had the same issue the PHP error log said the following:
PHP Fatal error: Interface 'Twig_LoaderInterface' not found in
/home/alex/projects/xxx/pagekit/extensions/twig/src/Twig/Loader.php on line 8"
while reading response header from upstream,
request: "POST /index.php/admin/system/extensions/enable?name=twig HTTP/1.1",
upstream: "fastcgi://unix:/var/run/php5-fpm.sock:",
referrer: "http://xxx.local/index.php/admin/system/extensions"
I'm not very familiar with composer, but I added the twig dependency to the composer.json and ran composer.phar update
. That failed stating
alex@loreley:~/projects/xxx/pagekit$ ./composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Updating guzzlehttp/streams dev-master (3b761a3 => 3e19419)
[RuntimeException]
The .git directory is missing from /home/alex/projects/xxx/pagekit/vendor/guzzlehttp/streams, see http://getcomposer.org/commit-deps for more information
I googled a little and the proposed solution was to delete the vendor dir and run composer.phar update
again. So did I. Unfortunately Pagekit was not usable afterwards throwing several javascript errors aso in the admin interface. So I reverted the vendor folder back to the code that came with Pagekit but did not delete the twig directory. I also saved the twig part of pagekit/vendor/composer/installed.json
and pagekit/composer.lock
and added it back after the revert. Finally I added
'Twig_' => array($vendorDir . '/twig/twig/lib'),
to the return array in pagekit/vendor/composer/autoload_namespaces.php
. Afterwards I was able to install the extension. Regarding this issue I have only one question: How can one install twig to a fixed page installation without that much pain?
Thank you!
Hi
I get this message when trying to activate the extantion in Pagekit?
Unable to activate extension. The extension triggered a fatal error.