Problem with "Pic_download_link" plugin in one of custom themes Problem with "Pic_download_link" plugin in one of custom themes
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Problem with "Pic_download_link" plugin in one of custom themes

Started by vikler, October 06, 2014, 09:19:39 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

vikler

Hi everyone. I seem to have problem with using "Pic_download_link" plugin in one of my custom themes. I can click the link, and the download starts. But I can't open image, it says I have a corrupted jpg.
Anyway, here is the link to the theme that seems problematic:
http://dane-dehaan.org/photos/displayimage.php?theme=omm_cpg18&album=322&pid=19472#top_display_media
try clicking on "Download HQ photo": you will face the problem described above
And on other themes it works well, the downloaded image can be opened and viewed:
http://dane-dehaan.org/photos/displayimage.php?theme=dane&album=322&pid=19472#top_display_media

ron4mac

There is a LF character (0x0A) prepended to the file when downloaded from the problem theme. I suspect that somewhere the theme code is unnecessarily outputting a linefeed character before the plugin gets a chance to send the file. Suspect areas to look for are extra lines after the closing ?> of a .php file. It's generally best to just delete the ?> at the end of php files.

vikler

Quote from: ron4mac on October 07, 2014, 12:30:58 AM
There is a LF character (0x0A) prepended to the file when downloaded from the problem theme. I suspect that somewhere the theme code is unnecessarily outputting a linefeed character before the plugin gets a chance to send the file. Suspect areas to look for are extra lines after the closing ?> of a .php file. It's generally best to just delete the ?> at the end of php files.
thanks for your reply, however I can't find where the located LF character is :( I don't use php's in this theme, it's just template.html. My theme.php is empty.
Any tips on how I find the LF character and get rid of it?:(

ron4mac


vikler