mayamcdougall / astral-pico

HTML5 UP! - Astral Theme - Ported to PicoCMS
Other
13 stars 8 forks source link

Error with compatibility plugin #3

Closed djupvikdigital closed 1 year ago

djupvikdigital commented 1 year ago

Trying to use Astral-Pico 1.0.1 I get this error message:

Fatal error: Uncaught RuntimeException: Unable to load PicoDeprecated compatibility plugin 'PicoThemeApi4CompatPlugin': Class not found in C:\Users\reida\Documents\repos\mormors\plugins\PicoDeprecated\PicoDeprecated.php:236 Stack trace: #0 C:\Users\reida\Documents\repos\mormors\plugins\PicoDeprecated\PicoDeprecated.php(287): PicoDeprecated->loadCompatPlugin('PicoThemeApi4Co...') #1 C:\Users\reida\Documents\repos\mormors\plugins\PicoDeprecated\PicoDeprecated.php(184): PicoDeprecated->loadThemeApiCompatPlugin(4) #2 C:\Users\reida\Documents\repos\mormors\vendor\picocms\pico\lib\AbstractPicoPlugin.php(101): PicoDeprecated->onThemeLoaded('astral', 4, Array) #3 C:\Users\reida\Documents\repos\mormors\plugins\PicoDeprecated\PicoDeprecated.php(126): AbstractPicoPlugin->handleEvent('onThemeLoaded', Array) #4 C:\Users\reida\Documents\repos\mormors\vendor\picocms\pico\lib\Pico.php(2788): PicoDeprecated->handleEvent('onThemeLoaded', Array) #5 C:\Users\reida\Documents\repos\mormors\vendor\picocms\pico\lib\Pico.php(444): Pico->triggerEvent('onThemeLoaded', Array) #6 C:\Users\reida\Documents\repos\mormors\index.php(33): Pico->run() #7 {main} thrown in C:\Users\reida\Documents\repos\mormors\plugins\PicoDeprecated\PicoDeprecated.php on line 236

PicoDeprecated compatibility plugins only go to version 2. I don't know if the error is in the theme, or in Pico itself, because I don't know where it gets the number 4 from.

OS: Windows 11 Platform: XAMPP

Steps to reproduce:

  1. Install PicoCMS from composer (version 2.1)
  2. Download Astral-Pico 1.0.1 and extract files into themes directory
  3. Change theme to astral in config/config.yml
  4. Set project path as www directory in Apache config
  5. Start Apache and navigate to http://localhost

Expected result: Working theme. Actual result: Above error message.

mayamcdougall commented 1 year ago

Hey. 👋🏻

Sorry for the confusion there. v1.0.1 is labeled as "Pre-Release", since it targets the yet-to-be released Pico 3.0.

When I set up that Pre-Release, it seemed like 3.0 would be out very soon. Unfortunately, that's kind of stalled for the moment. As it stands, the API Version does say 4 in that Pre-Release, because that's what the Pico 3.0-branch was using for testing, though I've since reverted it to 3 in a later commit.

Give v1.0.0 a try for now. All the "fixes" since then are just for targeting Pico 3.0 (which uses a newer version of Twig). You could try just correcting the api_version in pico-theme.yml to 2 if you want, but I suspect that some of the other changes will have broken compatibility with Pico 2's version of Twig.

I'm actually going to pull that release altogether, since atm it's kind of pointless (being neither up-to-date with the latest commit or targeting a released version of Pico).

djupvikdigital commented 1 year ago

Thank you, now I understand. I wasn't aware that 1.0.1 targets an unreleased version of PicoCMS. You can close this issue if you want to.

mayamcdougall commented 1 year ago

@djupvikdigital No worries. Thanks for bringing it to my attention. 😉