:bug: λ²κ·Έ λ₯Ό λ³΄κ³ ν©λλ€ . :bug:
Akeneo λ²μ : CE 4.0.31
μ ν κ°ν νμ΄μ§μμ pdfλ₯Ό λ€μ΄λ‘λνλ©΄ μλ URLλ‘ μ΄λνκ³ μ€λ₯κ° νμλ©λλ€. http://<pimhost>/enrich/product/1018/download-pdf?dataLocale=en_US&dataScope=ecommerce
Impossible to invoke a method ("__toString") on a string variable ("Some value")
in vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Enrichment/Bundle/Resources/views/Product/renderPdf.html.twig (line 118)
pim_catalog_simpleselect
λ° pim_catalog_multiselect
μ ν content
μ΄ μ€ 114 μμ μ΄λ―Έ λ¬Έμμ΄λ‘ λ³νλμκΈ° λλ¬Έμ λ°μν©λλ€.
{% set content = optionLabels[attribute.code] %}
κ°μ νμ΄μ§μ λ λ€λ₯Έ κ΄λ ¨ λ¬Έμ λ 110 νμ μμ΅λλ€.
pim_catalog_image
μ νμ κ²½μ° content
λ data
μμ±μ΄ μμ§λ§ media
μμ±μ΄ μλ $ Akeneo\Pim\Enrichment\Component\Product\Value\MediaValue
μ μΈμ€ν΄μ€μ
λλ€. κ·Έλ¬λ κ·Έ μ€μ content.media
λ₯Ό μ¬μ©νμ¬ μ€λ₯λ₯Ό λ°μμν΅λλ€.
λ€μ diffλ νμ¬ λ¬Έμ λ₯Ό ν΄κ²°ν μ μμ΅λλ€.
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 %}
μλ
νμΈμ @adhocore μ
λλ€ .
μ΄λ κ² μ νν μ€λͺ
κ³Ό ν¨κ» μ΄ λ¬Έμ λ₯Ό μ΄μ΄μ£Όμ
μ κ°μ¬ν©λλ€.
__toString
μ 첫 λ²μ§Έ λ¬Έμ μ κ΄λ ¨νμ¬ λΉ λ₯Έ μμ μ΄ 4.0.xμ 곧 λ³ν©λμ΄μΌ ν©λλ€. https://github.com/akeneo/pim-community-dev/pull/12430
λ λ²μ§Έ λ¬Έμ λ μκ°μ λ΄μ μ΅λν 빨리 μ΄ν΄λ³΄λλ‘ νκ² μ΅λλ€.
μλ νμΈμ,
λ λ²μ§Έ λ¬Έμ μ λν μμμ΄ μμ΅λκΉ?
μ λ§ κ°μ¬ν©λλ€π
μμ μ λ€μκ³Ό κ°μ΄ media μμ±μ μ μλ twig ν¨μλ₯Ό μ¬μ©νλ κ²μ λλ€.
{% if 'pim_catalog_image' == attribute.type and content.media is defined and content.media is not null %}
미리 λ΅λ³λλ¦¬μ§ λͺ»ν΄ μ£μ‘ν©λλ€.
λλ κ·Έκ²μ μ‘°μ¬νκ³ κ·Έκ²μ λν PRμ μ΄μμ΅λλ€ : https://github.com/akeneo/pim-community-dev/pull/12496
4.0.xμμ 곧 λ³ν©λμ΄μΌ ν©λλ€.
μ λ§ κ°μ¬ν©λλ€ π πͺ
μμ μ¬νμ΄ ν¬ν¨λ keneoμ μ λ²μ 릴리μ€κ° μλ κ²½μ° plsλ μ΄ λ¬Έμ λ₯Ό λ«μλ λ©λλ€. κ°μ¬ν©λλ€.
κ°μ₯ μ μ©ν λκΈ
미리 λ΅λ³λλ¦¬μ§ λͺ»ν΄ μ£μ‘ν©λλ€.
λλ κ·Έκ²μ μ‘°μ¬νκ³ κ·Έκ²μ λν PRμ μ΄μμ΅λλ€ : https://github.com/akeneo/pim-community-dev/pull/12496
4.0.xμμ 곧 λ³ν©λμ΄μΌ ν©λλ€.