Bonjour Charles69,
Merci pour Super Zoom.
J'ai un souci et je vous livre ce que j'observe, au cas où ça vous aide.
Sur la page photo, le bouton loupe s'affiche, mais au clic rien ne se passe. La console montre trois 404 :
…/picture.php/7326/category/plugins/super_zoom/vanilla/wheel-zoom.min.js
…/picture.php/7326/category/plugins/super_zoom/super_zoom.js
…/picture.php/7326/category/plugins/super_zoom/super_zoom.css
Les fichiers existent pourtant : en absolu, https://mon-site/plugins/super_zoom/super_zoom.js répond bien.
Ma config, si c'est utile : Piwigo 16.4.0, thème Modus, et URLs réécrites activées (picture_url_template = '%title-%id', file_ext_in_urls = false, question_mark_in_urls = false). Je me demande si ça ne joue pas sur le chemin des ressources, mais je vous laisse juge.
Merci d'avance, et dites-moi si vous voulez d'autres infos.
Antoine.
Last edited by antoinetempe (2026-06-16 21:37:45)
Offline
Bonsoir Antoine !
Chez moi Superzoom marche bien sur mes 3 thèmes, dont Modus, à condition que dans les paramètres du plugin, je choisisse l'affichage de l'icône près de la photo : si je je la mets dans la barre d'adresse, j'ai beau cliquer, il ne se passe rien de rien.
Offline
Bonjour,
Donc trois essais se tentent :
- changer la position du bouton pour Modus,
- changer de thème, par exemple Bootstrap Darkroom,
- désactiver l'URL rewriting.
Offline
Sur mes Piwigos, ça marche avec Bootstrap, et j'ai à peu près la même url-rewriting qu'Antoine. Reste le paramètre du plugin.
Offline
Bonjour,
Merci de parler EN sur le forum EN et d'aller sur le Forum FR pour cette discussion ;-)
Offline
Thank you all for the quick and helpful replies — Katryne, polowigo, and the Piwigo team.
First, my apologies: I hadn't realised there was a dedicated French-language forum, and I let this thread slip into French on the English board. Point well taken. I'll keep this one in English and take any further French discussion to the FR forum.
An update from my side, in case it's useful to anyone running rewritten URLs: I found that the three resources (wheel-zoom.min.js, super_zoom.js, super_zoom.css) were being requested under a relative path, which with my pretty-URL config resolved to .../picture.php/<id>/category/plugins/super_zoom/... Hence the 404s, even though the files are fine at their absolute location.
As a provisional fix on my own install, I switched those three paths to absolute in super_zoom_link() (main.inc.php), building them from get_absolute_root_url(). After clearing the template cache the zoom loads and works correctly on Modus, and the button styling came back too (the missing CSS was why it had been showing unstyled in the bottom corner).
Sharing it only as what worked for me here, not as a prescription. Happy to provide any further detail if helpful.
Thanks again,
Antoine
Offline
Hi Antoine,
I'm not familiar with URL redirection.
Is it enough to add the following to LFE:
`$conf['php_extension_in_urls'] = false;`
`$conf['category_url_style'] = 'id-name';`
`$conf['question_mark_in_urls'] = false;`
This single change causes a 404 error for me, regardless of which plugins are enabled.
Offline
Thank you, Charles, that's really kind of you to test it on your side.
I think your result might actually be pointing at two separate things. When the gallery 404s the moment those three lines go in — and whatever the plugins — that tends to be the URL rewriting itself rather than Super Zoom: the config flags change how Piwigo writes the URLs, but the server also needs to be set to resolve the extensionless paths (the Piwigo notes mention AcceptPathInfo / Options +MultiViews for that). On my host that part happens to be in place, which is probably why I get past it and land on the narrower issue.
So I don't think you need to go anywhere near URL rewriting to sort the plugin out — which is good news, since you mentioned it's not your area. On my install, with the gallery pages loading normally, the only thing that 404s is the three Super Zoom resources (wheel-zoom.min.js, super_zoom.js, super_zoom.css). They seem to be requested relative to the current page, so under a rewritten picture URL the browser looks for them in the wrong place.
The only change I made was to load those three from get_absolute_root_url(), and it's been happy ever since. It seems to behave the same whether pretty URLs are on or off, so it may be worth a look regardless of any of the above.
I'd be glad to send you the exact diff if it's useful, or my .htaccess if you ever want to recreate the rewritten-URL case. Thank you again for taking an interest — it's much appreciated.
Antoine
Offline
In main.inc.php I propose to replace:
version 2.1
function super_zoom_link() {
global $template, $conf;
$super_zoom_config = isset($conf['super_zoom_config']) ? safe_unserialize($conf['super_zoom_config']): array('button_position' => 'photo');
$button_position = isset($super_zoom_config['button_position']) ? $super_zoom_config['button_position']: 'photo';
$template->append('footer_elements', '
<script src="plugins/super_zoom/vanilla/wheel-zoom.min.js"></script>
<script src="plugins/super_zoom/super_zoom.js"></script>
<link rel="stylesheet" href="plugins/super_zoom/super_zoom.css" />
<script>
window.superZoomButtonPosition = "'. $button_position. '";
</script>
');
}by new version 2.2
function super_zoom_link() {
global $template, $conf;
$super_zoom_config = isset($conf['super_zoom_config']) ? safe_unserialize($conf['super_zoom_config']): array('button_position' => 'photo');
$button_position = isset($super_zoom_config['button_position']) ? $super_zoom_config['button_position']: 'photo';
$root = get_absolute_root_url();
$template->append('footer_elements', '
<script src="' . $root . 'plugins/super_zoom/vanilla/wheel-zoom.min.js"></script>
<script src="' . $root . 'plugins/super_zoom/super_zoom.js"></script>
<link rel="stylesheet" href="' . $root . 'plugins/super_zoom/super_zoom.css" />
<script>
window.superZoomButtonPosition = "'. $button_position. '";
</script>
');
}Can you tell me if that solves the problem?
Last edited by Charles69 (2026-06-18 17:28:37)
Offline
Hello Katryne !
Katryne wrote:
si je je la mets dans la barre d'adresse, j'ai beau cliquer, il ne se passe rien de rien.
Well, nothing's happening on my end either.
That's strange; I'm certain it worked in a previous version of the plugin or with a version prior to Piwigo 16.4.
I'll look into it.
Edit 16:55 problems solved
version 2.2 https://fr.piwigo.org/ext/index.php?eid=1039
Last edited by Charles69 (2026-06-19 16:56:29)
Offline
Hi Charles69,
Confirmed; version 2.2 solves it on my side. The three resources (wheel-zoom.min.js, super_zoom.js, super_zoom.css) now load correctly from the site root under friendly URLs, no more 404.
Thanks for integrating the get_absolute_root_url() fix directly into the plugin... much appreciated, it means I won't have to re-apply it manually after each update.
Best,
Antoine.
Offline