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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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 1 Guest 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