View Issue Details

IDProjectCategoryView StatusLast Update
0003235OXID eShop (all versions)2.6. Administer orderspublic2018-11-14 13:10
Reporterralph.g Assigned To 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionopen 
Summary0003235: pdf generation fails when using child theme -> missing pdf_logo.jpg
Descriptionpdf 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:
TagsOrder, PDF Invoice
ThemeAzure
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Relationships

has duplicate 0005053 resolvedLinas Kukulskis invoice creation not possible if child theme pdf_logo.jpg is missing 
child of 0004249 closedSvenBrunk relative paths in css for some elements prevent displaying in child theme 

Activities

ray

2012-04-12 22:44

reporter   ~0006262

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.

http://www.oxid-esales.com/forum/showthread.php?p=86402#post86402

leofonic

2012-05-31 14:20

reporter   ~0006710

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).

leofonic

2012-12-06 14:16

reporter   ~0008066

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.

ray

2012-12-06 15:04

reporter   ~0008067

related?
https://bugs.oxid-esales.com/view.php?id=4249

arturas.sevcenko

2012-12-07 12:20

reporter   ~0008073

Last edited: 2012-12-07 12:45

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.

leofonic

2012-12-07 13:37

reporter   ~0008075

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:


        //logo
        $myConfig = $this->getConfig();
        $sImagePath = $myConfig->getImagePath('pdf_logo.jpg' );
        $aSize = getimagesize($sImagePath );
        $iMargin = 195 - $aSize[0] * 0.2;
        $oPdf->setLink( $oShop->oxshops__oxurl->value );
        $oPdf->image( $sImagePath, $iMargin, 10, $aSize[0] * 0.2, $aSize[1] * 0.2, '', $oShop->oxshops__oxurl->value );
        return 14 + $aSize[1] * 0.2;

but not with correct lang folders.

QA

2018-11-14 13:09

administrator   ~0012682

Last edited: 2018-11-14 13:10

Moved the issue to the OXIDProjects/pdf-invoice-module repository since the module was excluded from the core.

Issue: https://github.com/OXIDprojects/pdf-invoice-module/issues/7
PR: https://github.com/OXIDprojects/pdf-invoice-module/pull/8

-MK