New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors in product pdf export from enrichment page #12298
Comments
The following diff might fix the issue for now diff --git a/src/Akeneo/Pim/Enrichment/Bundle/Resources/views/Product/renderPdf.html.twig b/src/Akeneo/Pim/Enrichment/Bundle/Resources/views/Product/renderPdf.html.twig
index 3730bea3c2b..7576ad0ef82 100644
--- a/src/Akeneo/Pim/Enrichment/Bundle/Resources/views/Product/renderPdf.html.twig
+++ b/src/Akeneo/Pim/Enrichment/Bundle/Resources/views/Product/renderPdf.html.twig
@@ -107,11 +107,12 @@
{% set content = product.getValue(attribute.code, locale_attribute, channel_attribute) %}
{% set manualHeight = true %}
- {% if 'pim_catalog_image' == attribute.type and content.media is not null %}
- {% set content = content.media.originalFilename %}
+ {% if 'pim_catalog_image' == attribute.type and content.data is not null %}
+ {% set content = content.data.originalFilename %}
{% set manualHeight = false %}
{% elseif ('pim_catalog_simpleselect' == attribute.type or 'pim_catalog_multiselect' == attribute.type) and attribute.code in optionLabels|keys %}
{% set content = optionLabels[attribute.code] %}
+ {% set manualHeight = false %}
{% endif %}
{% if content != null and manualHeight == true %} |
Hello, have you some news about the second issue ? Thank you very much 馃檹 The fix could be to use the twig function defined on the media attribute like that :
|
Sorry for not responding earlier. I've looked into it and opened a PR about it: #12496 |
Thank you very much 馃憤 馃挭 |
pls feel free to close this issue if we have new version release of akeneo with the fixes, thanks |
馃悰 I'm reporting a Bug 馃悰
Akeneo version: CE 4.0.31
When downloading pdf from product enrich page it goes to the below url and shows error:
http://<pimhost>/enrich/product/1018/download-pdf?dataLocale=en_US&dataScope=ecommerce
It happens because for
pim_catalog_simpleselect
andpim_catalog_multiselect
typecontent
is already converted to string in this line 114:{% set content = optionLabels[attribute.code] %}
Another related issue on same page is in line 110:
For type
pim_catalog_image
thecontent
is instance ofAkeneo\Pim\Enrichment\Component\Product\Value\MediaValue
which hasdata
property but notmedia
property. But that line usescontent.media
causing error.The text was updated successfully, but these errors were encountered: