Closed Geri-Borbas closed 6 years ago
Hi, did you use the branch pico-2.0 for Pico 2 ? I was waiting for the pico 2 release, but I'll make a pre-release to clarify.
Thanks! Trying it now...
It says...
Catchable fatal error: Argument 1 passed to PicoPagesList::onPageRendering() must be an instance of string, string given in <PATH>/plugins/PicoPagesList.php on line 67
...now.
PhpStorm suggests this:
I removed string
. Now it falls back to:
Fatal error: Uncaught exception 'LogicException' with message 'Unable to add filter "navigation" as extensions have already been initialized.' in <PATH>/vendor/twig/twig/lib/Twig/Environment.php:1103 Stack trace:
#0 <PATH>/plugins/PicoPagesList.php(74): Twig_Environment->addFilter(Object(Twig_SimpleFilter))
#1 [internal function]: PicoPagesList->onPageRendering('help.twig', Array)
#2 <PATH>/vendor/picocms/pico/lib/AbstractPicoPlugin.php(117): call_user_func_array(Array, Array)
#3 <PATH>/vendor/picocms/pico/lib/Pico.php(2432): AbstractPicoPlugin->handleEvent('onPageRendering', Array)
#4 <PATH>/vendor/picocms/pico/lib/Pico.php(476): Pico->triggerEvent('onPageRendering', Array)
#5 <PATH>/index.php(40): Pico->run()
#6 {main} thro in <PATH>/vendor/twig/twig/lib/Twig/Environment.php on line 1103
Should I remove other plugins?
I also had PicoGAnalytics.php
in plugins
, but the exception is still thrown without it as well.
Could you reproduce this issue?
Hi, thanks for the reports ! I'm able to reproduce this error with the beta 2, and it probably impact in the same way every one of my other plugins.
Everything works fine with the beta 1, so there is probably some breaking changes somewhere here :
https://github.com/picocms/Pico/compare/v2.0.0-beta.1...v2.0.0-beta.2
I don't know how it's supposed to be handled now, maybe some info will be provided on Pico stable release.
Note that the beta 2 mainly include a page tree which aim to cover this plugin needs, and which is recommended to use with handcrafted twig functions, so I'm not sure to push this plugin forward.
Wow, you mean I can add navigation without plugin in pico 2? Could you give me some pointers on docs / examples / tests / whatever?
Actually you can already with Pico 1, Pico 2 will only provide nested data. keep in mind that you'll have to craft it yourself in Twig. I don't think there is any examples or tests, but you'll find some infos in the API documentation. The development is a bit hard to follow, but you'll find some infos here : https://github.com/picocms/Pico/issues/401#issuecomment-343751698
Thanks, crafting twig myself somewhat kills the purpose of simplicity / ready-to-go-out-of-the-box feel of pico. I mean I could create a site from the ground up, but I really want to stay content focused this time.
So I think the plugin still has added value.
Fixed in Pico 2.0 concerned branches/releases. https://github.com/nliautaud/pico-pages-list/pull/10
Hi, I just added the file to
plugins
, now it throws this below (using pico 2).Any missing dependency, or what?