3
votes

I tried to allow inserting images in Product description. I followed official docs at help.hybris.com. An icon for Add image function appeared. I am able to upload the image, however the image is not shown on the frontend page (Product detail page). It's visible in the backoffice description field, so it's saved.

I also tried to enable base64encoding as suggested in the same manual, but it didn't help. After I made those changes, I did run ant clean all, restarted hybris server and run REDEPLOY in the Backoffice.

This is my custom-backoffice-config.xml file

  <context merge-by="type" parent="GenericItem" type="Product" component="editor-area">
        <editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea">
            <editorArea:tab name="hmc.tab.product.properties">
                <editorArea:section name="hmc.product.descriptions">
                        <editorArea:attribute editor="com.hybris.cockpitng.editor.localized(com.hybris.cockpitng.editor.wysiwyg)" qualifier="description" merge-mode="replace">
                            <editorArea:editor-parameter>
                                <editorArea:name>base64Encoded</editorArea:name>
                                <editorArea:value>true</editorArea:value>
                            </editorArea:editor-parameter>
                        </editorArea:attribute>
                        <editorArea:attribute qualifier="summary" merge-mode="remove"/>
                </editorArea:section>
            </editorArea:tab>
...

It looks like enabling of base64 encoding is not working for me, but I'm not able to see what's wrong there.

I'm using Hybris ver. 1811

1
Did you synch the Product ? If yes, what exactly do you see when you use the browser's "Inspect Element" to inspect the FrontEnd Page ? You should be able to see the HTML configured in your wyswig editor. Does that HTML contain an <img tag ?dj_frunza
Yes, I synced the product. There is just empty <p> tag without the img tag.Stepan Tuhacek
From what I know Product's description attribute is localized. Please make sure that your current session language that is used while accessing the FrontEnd Page is the same as the language for which the description was updated in the backoffice. Also please check whether the Online version of the product has the right description(Maybe a Synchronization issue appeared)dj_frunza
I checked that (added testing characters with every change) and I'm on the same language version as the edited description attribute.Stepan Tuhacek

1 Answers

0
votes

Turns out there was a function on the frontend which filtered out every html tags.
So I hade to just change it from this

${ycommerce:sanitizeHTML(product.description)}

to this

${product.description}