Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: commits

[bricoleurs/bricolage] 3a8e27: Fixed a bug in find_or_create_alternate()

 

 

Bricolage commits RSS feed   Index | Next | Previous | View Threaded


noreply at github

Aug 31, 2009, 12:03 PM

Post #1 of 1 (505 views)
Permalink
[bricoleurs/bricolage] 3a8e27: Fixed a bug in find_or_create_alternate()

Branch: refs/heads/master
Home: http://github.com/bricoleurs/bricolage

Commit: 3a8e2716dc801ad7ba6c1f14a3ce9b45664e9957
http://github.com/bricoleurs/bricolage/commit/3a8e2716dc801ad7ba6c1f14a3ce9b45664e9957
Author: David E. Wheeler <david[at]justatheory.com>
Date: 2009-08-31 (Mon, 31 Aug 2009)

Changed paths:
M lib/Bric/Biz/Asset/Business/Media/Image.pm
M t/Bric/Biz/Asset/Business/Media/Image/DevTest.pm

Log Message:
-----------
Fixed a bug in find_or_create_alternate()

Fixed a bug in `find_or_create_alternate()` where an element type is passed
with a different setting for its `top_level` attribute than is the value of
the `top_level` attribute of the original image's element type. This caused
problems because it looked for an existing image using the wrong URI. So I
hacked in a workaround to fool the current image into using the alternat's
element type when determining the URI, so that the URI should always be the
same. I ran into this in production for The Tyee, where editors were trying to
create non-fixed thumbnails for fixed images. This caused some pretty serious
indigestion. The workaround is a bit of a hack, but it's clean and works well.
I updated the test suite to replicate the issue before patching, so we do have
a proper regression test for the issue.

Bricolage commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.