1
Burning
Oledrion - Blank page for customers who buy a file :(
  • 2010/5/16 11:00

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi'

I have a very annoying problem with Oledrion.

When a customer buys a file, he receives an email containing a download link. But when he clicks on this link, he gets a blank page. Without Anything in Debug mode.

One hypothesis (but this may not be good) was that my hosting does not support detection mimetype. In the file Oledrion / download.php, there are these lines:
header ("Content-Type:"oledrion_utilsgetMimeType ($ file));
header ('Content-disposition: inline; filename = "'basename ($ file ).'"');
echo $ 
filecontents;
?>


I do not quite know what tests invent to solve this.
Would it be possible to remove this check mimetype, knowing that I would propose only pdf files (or if I compress only zip files).

Any help would be really appreciated.
Thank you in advance
Still learning CSS and... english

2
ghia
Re: Oledrion - Blank page for customers who buy a file :(
  • 2010/5/16 12:04

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Does that not have to be:
header("Content-Type: ".oledrion_utils::getMimeType($file));
header('Content-disposition: inline; filename="'.basename($file).'"');

3
Burning
Re: Oledrion - Blank page for customers who buy a file :(
  • 2010/5/16 12:31

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi'

I'm sorry, my code is wrong (google translate grrr).

Real code is :
01. $fileContent file_get_contents($file);
02. // Plugins *************
03. $plugins oledrion_plugins::getInstance();
04. $parameters = new oledrion_parameters(array('fileContent' => $fileContent'product' => $product'order' => $order'fullFilename' => $file));
05. $parameters $plugins->fireFilter(oledrion_plugins::EVENT_ON_PRODUCT_DOWNLOAD$parameters);
06. if(trim($parameters['fileContent']) != '') {
    
$fileContent $parameters['fileContent'];
07. 

08. // ********
09. // Et affichage du fichier avec le type mime qui va bien
10. header("Content-Type: ".oledrion_utils::getMimeType($file));
11. header('Content-disposition: inline; filename="'.basename($file).'"');
12. echo $fileContent;


So I tried
header("Content-Type: application/pdf");


Exactly same trouble : page is loading, but finally it is a blank one.


So I have look for Oledrion 2.2 and replace download.php file. Diff :
• lines 1 to 7 do not exist
• instructions to display file is readfile

// ******
// Et affichage du fichier avec le type mime qui va bien
header("Content-Type: ".oledrion_utils::getMimeType($file));
header('Content-disposition: inline; filename="'.basename($file).'"');
readfile($file);
?>


If I use download.php file from Oledrion 2.2, it works : pdf is displayed

If I add lines 1 to 7 with readfile($file); or with readfile($fileContent); instruction : blank page.


I will keep download.php from 2.2 because it works. But I hope it will be a better solution with the next release
Still learning CSS and... english

4
ghia
Re: Oledrion - Blank page for customers who buy a file :(
  • 2010/5/16 18:05

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Seems there is a problem with the plugins (don't know what they are supposed to do).

5
Burning
Re: Oledrion - Blank page for customers who buy a file :(
  • 2010/5/16 18:58

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi'

I think plugin is used in the process of creating the email sent to the client. Specifically, the download link in the email can be clicked a single time (this protects against some document Forward this mail function).

If the client contacts the administrator telling him he had a problem when downloading, it is possible to return the email with a new unique ID for the download link.

This new mail does not work properly: the download link is incomplete.

But this does not seem directly related to the first problem, it always happens.
Still learning CSS and... english

6
iliakros
Re: Oledrion - Blank page for customers who buy a file :(
  • 2010/6/21 11:30

  • iliakros

  • Just popping in

  • Posts: 21

  • Since: 2009/11/3


I was experiencing the same problem, blank page.

Go to download.php line 73

$parameters $plugins->fireFilter(oledrion_plugins::EVENT_ON_PRODUCT_DOWNLOAD$parameters);


change it to

$parameters[] = $plugins->fireFilter(oledrion_plugins::EVENT_ON_PRODUCT_DOWNLOAD$parameters);


For me now the problem is fixed and I get my download

Hope it helps you to,

Iliakros

Login

Who's Online

406 user(s) are online (292 user(s) are browsing Support Forums)


Members: 0


Guests: 406


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits