开发者

CMS pages do not displaying images in admin panel

I have a weird problem with magento cms module.

All 开发者_JAVA技巧the CMS pages on the frontend are displaying images correctly, but images are not displaying on the admin cms editor page. It just displays 'X' image broken icon.

I actually don't know where to start to fix this issue.

Any one had similar issue?


If in frontend you have the file http://yourdomain.com/media/your_file.jpg which renders perfectly, when editing the content in backend that file is linked through smtg like http://yourdomain.com/index.php/admin/cms_wysiwyg/directive/key/b9f80b36bc860a90ea2a03b61a6babfa/___directive/e3ttZWRpYSB1cmw9InBvd2RlcnNfOTB4OTAuanBnIn19/ and this image is broken.

The problem is that in Mage_Adminhtml_Cms_WysiwygController (Mage/Adminhtml/controllers/Cms/WysiwygController.php) method directiveAction the $url is ... an url (of course) instead of an image path which is what we need in this case.

You can create a module that overwrites the directiveAction and you would need to replace the $url assignment to $url = BP . str_replace(Mage::app()->getStore()->getConfig('web/unsecure/base_url'),"/", Mage::getModel('core/email_template_filter')->filter($directive) );

hope that works for you, Ky.


Try changing the following in your admin :

System -> Configuration -> General -> Content Management -> Use Static URLs for Media Content in WYSIWYG for Catalog to Yes

This setting is present in 1.7.0.2 at least.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜