Open tessus opened 2 years ago
It seems that all thumbnails are now huge. At least when the "old" ones are not in the browser cache.
So this is how it looked before (image 1):
And how it looks now (image 2):
Please help. I really do not like these huge album thumbnails and I don't know how to fix this.
I believe I found another clue.
When I start off with a browsesr with a clean cache and go to the gallery these huge icons show up. I can get to the normal view when clicking on the Grid view
icon and then I have to reload the page.
After that all pages are shown correctly with the album thumbnails in the correct size.
It seems that for some reason this javascript code is not loaded on page load when the browser cache is empty.
If the cookie view
is not set (with a value of either grid
or list
), these huge thumbnails (see image 1 in previous comment) show up. It looks to me that in the code there's no default value set and thus this weird behavior happens, when the browser cache is clean and there's no cookie view
.
@tkuther ^^^^
@plegall It seems that tkuther might not be maintaining this anymore. I believe I found the problem as described in the previous comment.
Unfortunately I do not know how to fix this myself. (To reproduce this, you only have to clear your browser cache/cookies and go to a piwigo instance that is using Darkroom.)
For anyone who's running into the same issue, here's a fix:
--- include/common.inc.php.orig 2021-12-07 00:19:43.456348537 +0100
+++ include/common.inc.php 2021-12-07 00:21:41.602356432 +0100
@@ -8,6 +8,15 @@
defined('PHPWG_ROOT_PATH') or trigger_error('Hacking attempt!', E_USER_ERROR);
+// workaround for UI garbage when cookie is missing
+// /ref https://github.com/tkuther/piwigo-bootstrap-darkroom/issues/297
+if (!isset($_COOKIE['view']))
+{
+ setcookie('view', 'grid', 0, '/');
+ header('Location: '.$_SERVER['REQUEST_URI']);
+ exit();
+}
+
// determine the initial instant to indicate the generation time of this page
$t2 = microtime(true);
I've upgraded Piwigo from 2.10.1 to 12.1..0 and thus bootstrap-darkroom was also upgraded to 2.5.0.
Since then there are 2 issues and I believe they are connected to the theme:
my main gallery page shows huge album thumbnails. Before the upgrade they looked like the ones in a sub album (see here). Couldn't find a setiing or maybe I missed it.all thumbnails are huge. Or is this the new look?Any ideas?