Closed DieterReinert closed 1 year ago
bump
i fixed an error that may be related to this
This is 500'ing because we never set a directory for css on the new loginserver, as far as I can tell. I just set it and rebooted, so it should work now.
I just tested and was still getting it. I'll later tonight at my personal computer.
Currently at work. Will keep you posted
Please try again? Re-targeted it to a new directory instead of the old one.
The issue is still there...
Any update?
@mia-pi-git said they were going to look at the php for the customcss, but the issue is still there any idea when we could expect a update on this?
The issue is still there
Nobody is currently working on this, sorry. Maybe @Zarel will fix it
Someone tagged me about this so I took a second to see what it is. My guess is that the CSS sanitizer library doesn't play nicely with the version of PHP we're using (8.1.2).
The error is
PHP Parse error: syntax error, unexpected token "match", expecting variable in lib/css-sanitizer/Wikimedia/CSS/Grammar/Matcher.php on line 121
Maybe this will give a starting point for someone to fix this error. Sorry I cannot be of more help.
@monsanto @Zarel it is because "Match" in php 8+ is a keyword. If you look at line 121: private static function collectSignificantWhitespace( Match $match, &$ret = [] ) {
It uses Match as a type here which is not allowed in PHP 8+.
In the update code (found here: https://github.com/wikimedia/css-sanitizer/tree/master/src) it is like this: private static function markSignificantWhitespace( $list, $match, $significantWS, $end ) {
Which should solve the issue potentially. (this should be replaced with the link above: https://github.com/smogon/pokemon-showdown-client/tree/master/lib/css-sanitizer/Wikimedia/CSS)
A PR that renames the new keyword may be the easiest fix, if someone wants to do it. Alternatively the library could be upgraded but that might introduce other compatibility problems and would require someone with a working client setup to test.
https://github.com/smogon/pokemon-showdown-client/pull/2126 Tried to fix it by upgrading the library.
Same error is back, might be due to the recent refactors
(Fixed again in bd134f4ccf541378979c.)
Whenever trying to reload custom CSS we get a HTTP ERROR 500.
This started happening after the issue where https://play.pokemonshowdown.com/ was unavailable because they had to move to a new server.