With Piwigo 2.10 and PHP 7.3 (Debian Buster, 7.3.9-1~deb10u1), Piwigo JShrink triggers a deprecation notice that ends up mixed with the javascript file:
<b>Deprecated</b>: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in <b>/var/www/include/jshrink.class.php</b> on line <b>195</b><br />;
This is obviously not corrrect Javascript, so the script fails to load in browser, triggering this error in firefox: SyntaxError: expected expression, got '<'
I think latest JShrink versions fix this.
edit: markdown syntax
With Piwigo 2.10 and PHP 7.3 (Debian Buster, 7.3.9-1~deb10u1), Piwigo JShrink triggers a deprecation notice that ends up mixed with the javascript file:
```
<b>Deprecated</b>: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in <b>/var/www/include/jshrink.class.php</b> on line <b>195</b><br />;
```
This is obviously not corrrect Javascript, so the script fails to load in browser, triggering this error in firefox: `SyntaxError: expected expression, got '<'`
I think latest JShrink versions fix this.
edit: markdown syntax
<!-- github-sync-id:505084513 -->
Hmm, yeah. It seems that the old issue was marked resolved for 2.5, but it seems to happen for me with 2.10. I'm running it on Docker (https://github.com/maakuth/docker-piwigo) which does a clean install of Piwigo files (using pre-existing db and galleries), so it should not be a file integrity issue.
For now I'm using Debian Stretch based container as workaround, that has PHP 7.0.
Hmm, yeah. It seems that the old issue was marked resolved for 2.5, but it seems to happen for me with 2.10. I'm running it on Docker (https://github.com/maakuth/docker-piwigo) which does a clean install of Piwigo files (using pre-existing db and galleries), so it should not be a file integrity issue.
For now I'm using Debian Stretch based container as workaround, that has PHP 7.0.
<!-- github-comment-id:540950662 -->
@maakuth can you copy the include/jshrink.class.php file from a Piwigo 2.9.5 to your 2.10.0 install and tell us if it removes the problem?
@maakuth can you copy the `include/jshrink.class.php` file from a Piwigo 2.9.5 to your 2.10.0 install and tell us if it removes the problem?
<!-- github-comment-id:541120743 -->
Actually I've been able to reproduce the bug and the fix from Piwigo 2.9.5 works fine https://piwigo.org/forum/viewtopic.php?pid=174596#p174596
(looks like Piwigo 2.10.1 is coming soon...)
<!-- github-comment-id:541126980 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
With Piwigo 2.10 and PHP 7.3 (Debian Buster, 7.3.9-1~deb10u1), Piwigo JShrink triggers a deprecation notice that ends up mixed with the javascript file:
This is obviously not corrrect Javascript, so the script fails to load in browser, triggering this error in firefox:
SyntaxError: expected expression, got '<'I think latest JShrink versions fix this.
edit: markdown syntax
See #988 and #952
Ah, pardon me.
No pardon, the issue mentioned above is marked closed, but there should definitely be an open issue for this :)
Hmm, yeah. It seems that the old issue was marked resolved for 2.5, but it seems to happen for me with 2.10. I'm running it on Docker (https://github.com/maakuth/docker-piwigo) which does a clean install of Piwigo files (using pre-existing db and galleries), so it should not be a file integrity issue.
For now I'm using Debian Stretch based container as workaround, that has PHP 7.0.
I think I'm simply gonna redo the same changes as we did on
15d8a19880@maakuth can you copy the
include/jshrink.class.phpfile from a Piwigo 2.9.5 to your 2.10.0 install and tell us if it removes the problem?Actually I've been able to reproduce the bug and the fix from Piwigo 2.9.5 works fine https://piwigo.org/forum/viewtopic.php?pid=174596#p174596
(looks like Piwigo 2.10.1 is coming soon...)
Ok, I was not available at that point, good to hear that you could repro it.
Fixed in
9b695da(master) and cherry-picked on 2.105cbe5aa