Ticket #142 (new defect)

Opened 2 years ago

Last modified 10 days ago

Bug related to width/height of large thumbnails. Cache is never used if square thumbs option is unchecked!

Reported by: admin@… Owned by: mike
Priority: high Milestone: 1.1
Component: General Version:
Severity: major Keywords: 2nd-opinion
Cc:

Description

Preamble:

I was messing with thumbnail generation to enable Lightbox (as you can see, it works marvelously here: http://zhopik.com/plogger/index.php. Click into any album, then click the little blue icon under any image to see Lightbox work).

So I was using a function generate_thumb(), and as mike described here: http://dev.plogger.org./ticket/119, if in the options Square Thumbs is unchecked, then Plogger uses the value set in Large Thumbnail Width (pixels) option as height instead of width.

Problem:

in file plog-functions.php in function generate_thumb() line 69: ... ($thumb_configfilename_prefix? != && $thumb_configsize? != $width) ...

In case of a large thumb, the prefix will be 'lrg-', so the first part is true. However, thumb_configsize? is never equal to $width because $thumb_configsize? is actually HEIGHT in this case. In my example the image size is 800*600, obviously 600 != 800, and the function always executes the block of code that actually regenerates the thumb (that's the slowest part of this function, especially noticeable with large files).

The fix is to edit a little bit more login related to square thumbs option but a quick hack was just to change $width to $height and it worked for my purposes.

I consider this an important bug, hopefully it wasn't too cryptic.

Rock on!

Change History

Changed 6 weeks ago by sidtheduck

I don't see this code in the codebase anymore, so I think the "no-caching for non-square thumbnails" is fixed.

Anyone else see a reason not to close this ticket? I'm not sure when or where the code was fixed, but it was before my time. :)

Changed 6 weeks ago by sidtheduck

  • keywords 2nd-opinion added; cache, thumbnail, width, height removed

Changed 4 weeks ago by sidtheduck

  • milestone set to 1.1

Changed 10 days ago by kimparsell

I don't see this code anymore either, so I think we can close this ticket.

Note: See TracTickets for help on using tickets.