magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.55k stars 9.32k forks source link

Wysywig editor shows broken image icons #10417

Closed deadlyw1re closed 7 years ago

deadlyw1re commented 7 years ago

Preconditions

  1. Magento 2.1.7
  2. PHP 7.0

Steps to reproduce

  1. Add image in Wysywig editor

Expected result

  1. Image is shown in editor

Actual result

  1. Broken image icon
  2. Url is <img src="http://domain/path-to-magento/adminurl/cms/wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvcGRmL3BkZi5wbmcifX0,/key/e44fd2b2430f15239de43de5a10cb958615b525bb7bca920ab2865c99ff7de7d/" data-mce-src="http://domain/path-to-magento/adminurl/cms/wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvcGRmL3BkZi5wbmcifX0,/key/e44fd2b2430f15239de43de5a10cb958615b525bb7bca920ab2865c99ff7de7d/">
hostep commented 7 years ago

If this occurs on the product or category wysiwyg fields, then it is probably a duplicate of https://github.com/magento/magento2/issues/6138, and this bug will be fixed in Magento 2.1.8: https://github.com/magento/magento2/commit/ba6612462c260da7cc534b6365623993a6fe4311

deadlyw1re commented 7 years ago

@hostep This occures in the wysiwyg editor itself, on the frontend the images are visible.

hostep commented 7 years ago

@deadlyw1re: Yes, but which wysiwyg editor? The one in the CMS pages/blocks shouldn't have this bug, only the wysiwyg editor on the product and categories edit forms if I remember correctly.

deadlyw1re commented 7 years ago

@hostep This bug occures on CMS pages/blocks and products/categories

PieterCappelle commented 7 years ago

@hostep I think the bug is back in 2.1.9. We are having the same problem in CMS Pages / Blocks. When you insert image in 2.1.8, we get <p><img src="{{media url="wysiwyg/Hond.jpg"}}" width="1024" height="683" /></p> when we insert image in 2.1.9 <p><img src="http://local.magento/admin/cms/wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvVmVsZC5qcGcifX0%2C/key/d3f89696a93152f6d352e5d5cb391180a27c8a7924d9fe3b583d3e9f03d00753/" width="959" height="1024" /></p>

hostep commented 7 years ago

@PieterCappelle: that's weird, I can't really see anything at first sight in the diff between 2.1.8 and 2.1.9 which can cause this bug to re-appear.

Can you reproduce it on a clean 2.1.9 installation?

PieterCappelle commented 7 years ago

@hostep Tomorrow at MM17BE? Will show you my case.

hostep commented 7 years ago

Confirmed, tried it on a clean 2.1.8: no problem Then on a clean 2.1.9: and the problem you describe appears. God damned, I hoped we were finally rid of this bug, but it came back :(

(See you tomorrow at MM17BE :))

PieterCappelle commented 7 years ago

You should join the Slack channel of Magento. Let's fix this in the contribution day :-)

okorshenko commented 7 years ago

Just for info: https://github.com/magento/magento2/compare/2.1.8...2.1.9#diff-92c32b12996a53a237ff51fa0d39d829R113

magento-engcom-team commented 7 years ago

@deadlyw1re, thank you for your report. We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.

magento-team commented 7 years ago

Internal ticket to track issue progress: MAGETWO-80230

magento-team commented 7 years ago

Internal ticket to track issue progress: MAGETWO-81305

LSERRE commented 7 years ago

I have the same issue on 2.2.0.

WalterSmulders commented 7 years ago

I experienced the same issue today and it kept me busy for a half day, but I found that at least my problem was not related to the Magento code.

One of the external extensions had a extra empty line at the beginning of the registration.php. This extra empty line was added at the beginning of the response. Which in turn made the browser not recognising the image and thus not showing it since it doesn't start with the required bytes.

I could find the registration.php that was responsible for this error by debugging trough app/etc/NonComposerComponentRegistration.php simply put a echo $file; after include $file; if you see that the text (filenames) start on a new line you know it is the file that starts on that line.

okorshenko commented 6 years ago

Hi @deadlyw1re. Thank you for your report. The issue has been fixed in magento-engcom/magento2ce#1380 by @magento-engcom-team in 2.3-develop branch Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

Vishrootways commented 6 years ago

How to solve this error in Magento 2.1.8 version? Please help us if anyone know.