isotope / core

Core repository of Isotope eCommerce, an eCommerce extension for Contao Open Source CMS
https://isotopeecommerce.org
135 stars 107 forks source link

No PDF generated when the Gallery field in Documents is not empty #999

Closed netzarbeiter closed 10 years ago

netzarbeiter commented 10 years ago

If you have chosen a Gallery in the section General settings > Documents, the following error message shows up, while trying to print a document in the order list.

Warning: fopen() [function.fopen]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in system/modules/core/vendor/tcpdf/include/tcpdf_images.php on line 238
aschempp commented 10 years ago

@Toflar how do we solve this? The server requirements are not met to include images in the PDF.

Options:

  1. Remove images before generating the PDF
  2. Show a warning in the backend
  3. …?
Toflar commented 10 years ago

In my opinion we only need to do the following:

Old:

$strBuffer = \Controller::convertRelativeUrls($strBuffer, '');

New:

 $strBuffer = \Controller::convertRelativeUrls($strBuffer, '', true);

So only href attributes get "absolutized" and not images. fopen will then access the images as usual on the server. So in other words: same as Contao does :D

aschempp commented 10 years ago

But that will not work for Emails? Or is it a different routine?

aschempp commented 10 years ago

Should be fixed in 31344c06faf6ad25abbfda55bd5c48db044c9740