Error grav upgrade 1.7.30

Hi, I’ve an issue during the grav upgrade form version 1.7.25 to version 1.7.30
aftrer the upgrade I receive server error 500.
I’ve done many test and the issue start with versione 1.7.29. I mean until version 1.7.28 all works well but with version 1.7.29 I receive error 500 from server.

Could someone help me to understand the issue?
The test was done with Open Publishing Space skeleton.
I’ve check error 500 and no prnblem whit .htaccess
Checking the change log I can see:

Added unicode-safe Utils::basename() and Utils::pathinfo() methods
Improved Filesystem::basename() and Filesystem::pathinfo() to be unicode-safe
Made path handling unicode-safe, use new Utils::basename() and Utils::pathinfo() everywhere
But I’m not able to understand the problem regards.

If I look in the logs directory I can see grav.log file with the following error:

[2022-02-21 13:37:54] grav.CRITICAL: Grav\Common\Utils::pathinfo(): Argument #1 ($path) must be of type string, null given, called in C:\xampp\htdocs\grav\system\src\Grav\Common\Assets.php on line 201 - Trace: #0 C:\xampp\htdocs\grav\system\src\Grav\Common\Assets.php(201): Grav\Common\Utils::pathinfo(NULL, 4) #1 C:\xampp\htdocs\grav\system\src\Grav\Common\Assets.php(193): Grav\Common\Assets->add(‘user://sweetale…’, 101) #2 C:\xampp\htdocs\grav\system\src\Grav\Common\Assets.php(198): Grav\Common\Assets->add(Array, 101) #3 C:\xampp\htdocs\grav\user\plugins\featherlight\featherlight.php(104): Grav\Common\Assets->add(‘jquery’, 101) #4 C:\xampp\htdocs\grav\vendor\symfony\event-dispatcher\EventDispatcher.php(264): Grav\Plugin\FeatherlightPlugin->onTwigSiteVariables(Object(RocketTheme\Toolbox\Event\Event), ‘onTwigSiteVaria…’, Object(Symfony\Component\EventDispatcher\EventDispatcher)) #5 C:\xampp\htdocs\grav\vendor\symfony\event-dispatcher\EventDispatcher.php(239): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, ‘onTwigSiteVaria…’, Object(RocketTheme\Toolbox\Event\Event)) #6 C:\xampp\htdocs\grav\vendor\symfony\event-dispatcher\EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, ‘onTwigSiteVaria…’, Object(RocketTheme\Toolbox\Event\Event)) #7 C:\xampp\htdocs\grav\system\src\Grav\Common\Grav.php(577): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(RocketTheme\Toolbox\Event\Event), ‘onTwigSiteVaria…’) #8 C:\xampp\htdocs\grav\system\src\Grav\Common\Twig\Twig.php(413): Grav\Common\Grav->fireEvent(‘onTwigSiteVaria…’) #9 C:\xampp\htdocs\grav\system\src\Grav\Common\Service\OutputServiceProvider.php(36): Grav\Common\Twig\Twig->processSite(‘html’) #10 C:\xampp\htdocs\grav\vendor\pimple\pimple\src\Pimple\Container.php(122): Grav\Common\Service\OutputServiceProvider->Grav\Common\Service{closure}(Object(Grav\Common\Grav)) #11 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\RenderProcessor.php(40): Pimple\Container->offsetGet(‘output’) #12 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\RenderProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #13 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #14 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\DebuggerAssetsProcessor.php(38): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #15 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\DebuggerAssetsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #16 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #17 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\PagesProcessor.php(112): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #18 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\PagesProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #19 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #20 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\TwigProcessor.php(38): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #21 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\TwigProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #22 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #23 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\AssetsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #24 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\AssetsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #25 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #26 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\SchedulerProcessor.php(40): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #27 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\SchedulerProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #28 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #29 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\BackupsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #30 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\BackupsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #31 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #32 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\TasksProcessor.php(69): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #33 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\TasksProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #34 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #35 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\RequestProcessor.php(64): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #36 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\RequestProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #37 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #38 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\ThemesProcessor.php(38): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #39 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\ThemesProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #40 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #41 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\PluginsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #42 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\PluginsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #43 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #44 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\InitializeProcessor.php(130): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #45 C:\xampp\htdocs\grav\system\src\Grav\Common\Debugger.php(546): Grav\Common\Processors\InitializeProcessor::Grav\Common\Processors{closure}() #46 C:\xampp\htdocs\grav\system\src\Grav\Common\Processors\InitializeProcessor.php(131): Grav\Common\Debugger->profile(Object(Closure)) #47 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\InitializeProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #48 C:\xampp\htdocs\grav\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #49 C:\xampp\htdocs\grav\system\src\Grav\Common\Grav.php(306): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #50 C:\xampp\htdocs\grav\index.php(54): Grav\Common\Grav->process() #51 {main} [] []

@Nando, It seems plugin Featherlight plays a role in the Exception.

  • Have you tried upgrading the plugins using $ bin/gpm update?
  • Or else
    • disable Featherlight,
    • upgrade Grav using $ bin/gpm self-upgrade
    • and enabling Featherlight again.

Hi. thank you for your suggestion.
I tried to disable Featherlight plugin and then install BUT I’ve the same error (500 from server e same log in grav.log file).

I tried also bin/gpm self-upgrade but also this fails. Below the output

Preparing to upgrade to v1.7.30…
|- Downloading upgrade [8.69M]… 100%
|- Installing upgrade… error
| '- Return type of Pimple\Container::offsetUnset($id) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
'- Installation failed or aborted.

regards

@Nando, I have no idea what is happening, but do have another suggestion:

  • Copy folder /user to a save place
  • Create a fresh installation of Grav 1.7.30
  • Copy folder /user back.

If that doesn’t work, and no other members offers a solution, please create an issue at Github

Thank you
I’ve done the same test with a different version of PHP Version 7.4.27. Now the upgrade seems to be succesfully BUT same error 500 on server side and same error log in grav.log file

Would you like to upgrade now? [y|N] (yes/no) [no]:

y

Preparing to upgrade to v1.7.30…
|- Downloading upgrade [8.69M]… 100%
|- Installing upgrade… ok
'- Success!

@Nando, If you can create a reproducible case it might be nice if you could create an issue at Github.

If your site has now been upgraded succesfully, you may mark this post as ‘solved’ by ticking the ‘solution’ icon in the lower right corner of your last reply.

Just a question. the upgrade is always done well. Are there other log file that can be read in order to understand error 500 from web server? Seems that asset.php file in line 201 has a problem with path() and this is a modification that was done starting from 1.7.29 version. The upgrade itself works but for i receive a php error

[2022-02-21 13:37:54] grav.CRITICAL: Grav\Common\Utils::pathinfo(): Argument #1 ($path) must be of type string, null given, called in C:\xampp\htdocs\grav\system\src\Grav\Common\Assets.php on line 201

I found the issue in the file named:
system\src\Grav\Common\Assets.php on line 201
change from:
$extension = Utils::pathinfo(parse_url($asset, PHP_URL_PATH), PATHINFO_EXTENSION);

to

$extension = pathinfo(parse_url($asset, PHP_URL_PATH), PATHINFO_EXTENSION);

and now works

Please create an issue at Github where the dev team lives. They do not visit this forum.

1 Like

Once I had a file cache writing method issue after upgrade. I don’t remember where bt check your config …