View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003235||OXID eShop (all versions)||2.6. Administer orders||public||2011-09-08 13:31||2018-11-14 13:10|
|Target Version||Fixed in Version|
|Summary||0003235: pdf generation fails when using child theme -> missing pdf_logo.jpg|
|Description||pdf generation of invoices fails. i have a child template. within this child template i have a directory called img but no changes to the logo img so no upload within this directory. seems like fallback to parent theme isn't working correctly.|
2011/09/08 12:51:14 [error] 27791#0: *18 FastCGI sent in stderr: "PHP Warning: getimagesize(/srv/www/xxx/out/childtheme/img//pdf_logo.jpg): failed to open stream: No such file or directory in /srv/www/xxx/modules/invoicepdf/myorder.php on line 747" while reading response header from upstream, client: 213.61.xxx.xxx, server: shop.xxx.de, request: "POST /admin/index.php?editlanguage=0&stoken=B76C8213& HTTP/1.1", upstream:
|Tags||Order, PDF Invoice|
|PHP Version||Not defined|
|Database Version||Not defined|
Is this img referenced directly? Then of course it would search in the img-folder from Child-Theme only.
If so - could this be done in a different way? There seem to be more problems with direct referencing, as well inside the css (like steps.png within azure/img).
If not possible to implement a fallback to parent theme in those cases, we need to explain clearly in tutorials, manuals and FAQ for Themes Management and Child Themes how to handle. Either copy all necessary files to Child Theme (which ones?), or use css from Parent Theme and just override particular changes with the css in Child Theme folder.
||PDF-Generation should use inheritance for the image, so it is no longer needed to copy the pdf-logo (and find out that you have to do so in the first place). The other images in css: maybe an empty custom.css could be used, so it would not be neccessary to either override base.tpl (in order to use an additional css-file) or copy the whole image-folder to the custom theme folder (which is needed if you ovverride oxid.css).|
||I just noticed that if you create language-specific folders like out/template/de/img, even if there is a logo in template/img, pdf generation fails because it looks only in the language-specific folder.|
yes, it is related to https://bugs.oxid-esales.com/view.php?id=4249
P.S. please specify product version on every bug report you submit. thank you.
4.7.1 or ever since.
It is different from 4249 in the respect that it doesn't use relative paths but getImageDir(). It works when i change it like this:
$myConfig = $this->getConfig();
$sImagePath = $myConfig->getImagePath('pdf_logo.jpg' );
$aSize = getimagesize($sImagePath );
$iMargin = 195 - $aSize * 0.2;
$oPdf->setLink( $oShop->oxshops__oxurl->value );
$oPdf->image( $sImagePath, $iMargin, 10, $aSize * 0.2, $aSize * 0.2, '', $oShop->oxshops__oxurl->value );
return 14 + $aSize * 0.2;
but not with correct lang folders.
Moved the issue to the OXIDProjects/pdf-invoice-module repository since the module was excluded from the core.