Site is blank with addition of Uniform plugin

@mzur After some years, discovering that parts of a site I’d built for a client were no longer operating — including its forms — I have learnt how important it is to monitor PHP versions and keep Kirby up to date.

So I’ve bitten the bullet and finally got around to upgrading the site from Kirby 2 to Kirby 3, to future proof it a little more as PHP 7.4 gets phased out.

All seems to be working again, after lots of fiddling — except one thing.

I worked through the upgrade process for Uniform. But with the Uniform plugin present, the site vanishes. Blank screen, no content.

I see that others posting here have had success in fixing a similar issue by upgrading their PHP version. But this is happening under PHP 8.1 and 8.0, and this is what I am aiming to use.

Is Uniform v4 for Kirby 3 compatible with PHP 8/8.1? Or is there something else I should look for?

The current Uniform version is 5.2.0, so why are you using v4?

PHP 8 support was added in Uniform v5.0.3. The most recent version is v5.5.0 (sorry @texnixe :wink:) and supports PHP 8.0, 8.1 and 8.2.

I’m sorry, it’s the latest version of Uniform. I did try to find the version number, or any documentation that mentioned a v5, but couldn’t find it, so I assumed I was still using v4.

Update on this. I’ve installed the site locally, with PHP 8.1 running, and managed to get some error messages. (On a remote dev site, nothing is reported.)

Here’s what I get:

Fatal error: Uncaught Whoops\Exception\ErrorException: include(/Users/xxmexx/Local Sites/ibsk3/app/public/site/plugins/uniform/vendor/composer/…/getkirby/cms/src/Cms/Event.php): Failed to open stream: No such file or directory in /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/composer/ClassLoader.php:582 Stack trace: #0 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/composer/ClassLoader.php(582): Whoops\Run->handleError(2, ‘include(/Users/…’, ‘/Users/xxmexx…’, 582) #1 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/composer/ClassLoader.php(582): include() #2 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}(‘/Users/xxmexx…’) #3 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/src/Cms/App.php(1686): Composer\Autoload\ClassLoader->loadClass(‘Kirby\Cms\Event’) #4 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/src/Cms/AppErrors.php(177): Kirby\Cms\App->trigger(‘system.exceptio…’, Array) #5 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php(50): Kirby\Cms\App->Kirby\Cms{closure}(Object(Error), Object(Whoops\Exception\Inspector), Object(Whoops\Run)) #6 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/filp/whoops/src/Whoops/Run.php(398): Whoops\Handler\CallbackHandler->handle(Object(Error)) #7 [internal function]: Whoops\Run->handleException(Object(Error)) #8 {main} thrown in /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/composer/ClassLoader.php on line 582

Fatal error: Uncaught Error: Class “Whoops\Util\Misc” not found in /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/filp/whoops/src/Whoops/Exception/Inspector.php:269 Stack trace: #0 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/filp/whoops/src/Whoops/Exception/Inspector.php(187): Whoops\Exception\Inspector->getTrace(Object(Whoops\Exception\ErrorException)) #1 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php(308): Whoops\Exception\Inspector->getFrames(Array) #2 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php(219): Whoops\Handler\PrettyPageHandler->getExceptionFrames() #3 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/filp/whoops/src/Whoops/Run.php(398): Whoops\Handler\PrettyPageHandler->handle(Object(Whoops\Exception\ErrorException)) #4 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/filp/whoops/src/Whoops/Run.php(482): Whoops\Run->handleException(Object(Whoops\Exception\ErrorException)) #5 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/composer/ClassLoader.php(582): Whoops\Run->handleError(2, ‘include(/Users/…’, ‘/Users/xxmexx…’, 582) #6 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/composer/ClassLoader.php(582): include(‘/Users/xxmexx…’) #7 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}(‘/Users/xxmexx…’) #8 /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/filp/whoops/src/Whoops/Run.php(506): Composer\Autoload\ClassLoader->loadClass(‘Whoops\Util\Mis…’) #9 [internal function]: Whoops\Run->handleShutdown() #10 {main} thrown in /Users/xxmexx/Local Sites/ibsk3/app/public/kirby/vendor/filp/whoops/src/Whoops/Exception/Inspector.php on line 269

OK, progress.

The above stack trace was produced by Uniform 5.5. I stepped down to Uniform 5.4.2 and… success. At least as far as getting the site to display.

Thank you, @texnixe and @mzur for alerting me to later versions of Uniform. I presume the docs for v4 work just as well for v5?

Just need to sort out a few more bugs, but at least I can see something now.

The latest docs are for Uniform v5.

The error you have shown seems to be an issue with Uniform. It’s because Kirby plugins should support the installation via ZIP and but I prefer the installation via Composer. Supporting both sometimes produces errors like yours because I didn’t “package” the Composer dependencies correctly in the ZIP. I’ll look into it.

@mzur I did see the reference to Composer, and wondered if that was the case. I’ll have to improve my skills!

The latest docs I can find are here: Kirby Uniform

In the Upgrade Guide section of this, it refers to the way v.3 worked vs v.4. So I thought I must be using v.4. So there are no differences in syntax for v.5?

Yes, no differences there. I’ll try to make the docs more clear.