Upgrade grav 1.7.30 and 1.7.29 servr error 500
NandoPiz opened this issue · comments
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.
The test was done with Open Publishing Space skeleton.
I’ve check error 500 and no problem with .htaccess
Checking the change log from version 1.7.29 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
If I look in the logs directory I can see grav.log file (see attachment)
In order to solve the issue I've changed
system\src\Grav\Common\Assets.php file on line 201
from:
$extension = Utils::pathinfo(parse_url($asset, PHP_URL_PATH), PATHINFO_EXTENSION);
to
$extension = pathinfo(parse_url($asset, PHP_URL_PATH), PATHINFO_EXTENSION);
I've removed Utils::
I didn't understand if this is a bug or problem related to my environment
regards
I found the issue:
In the config file user\config\system.yaml
I0ve the following config:
assets:
js_module_pipeline_before_excludes: true
js_minify: true
enable_asset_timestamp: false
enable_asset_sri: false
collections:
jquery :
- 'system://assets/jquery/jquery-2.x.min.js'
- 'user://sweetalert2.all.min.js'
- 'user://jquery.cookiebar.js'
with this config the Utils::pathinfo return "NULL" that is not accepetd. I need to keep all 3 js. Any suggestion
@NandoPiz I made the methods less strict, but the issue is that some of the files doesn't exist, which causes the method to return false.
Please try CI build, it should work.