Help - Search - Members - Calendar
Full Version: Invalid src URL created for thumbnails
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
dgrotto
Hello-

My configuration is as follows:

WinXP
Apache 2.0.50
ActiveState Perl 5.8.3 build 809
Image:Magick 6.0.3 Q16
MT 3.0D

Local site path = d:/htdocs
Local archive path = d:/htdocs/archives

Symptoms:

I upload an image using the upload file option. I choose to upload into the archive path.

I choose to create a thumbnail and click the embedded image button. MT returns to the new entry page and pastes the following html in to the body:

CODE
<a href="http://www.domain.com/archives/Winter.jpg"><img alt="Winter.jpg" src="http://www.domain.com/archives/D:\htdocs\archives\Winter-thumb.jpg" width="320" height="240" border="0" /></a>


I have tried alomost every combination of relative and absolute references to my site paths that I can think of. Since the href link is correctly generated, I am guessing this may be a bug. Thanks for your help.
TweezerMan
When MT is figuring out the URL for the thumbnail, it starts with the full path and filename as reported by the file system:
CODE
D:\htdocs\archives\Winter-thumb.jpg

MT then looks for your Local Archive Path at the beginning of the filename in order to strip it off:
CODE
d:/htdocs/archives

Unfortunately, "D:" does not match "d:", and "\" does not match "/", so nothing is stripped from the path/filename of the the thumbnail and it is included in its entirety in the URL.

To fix: Modify your paths in Weblog Config, using an upper case letter for the drive, and "\" as a path separator:

Local Site Path:
D:\htdocs

Local Archive Path:
D:\htdocs\archives
dgrotto
Thank you , Tweezerman! Once again, you rock.

Mods, can you please move this topic over to Basic Installation and Setup? Thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.