Avoid to getting black “skin image” in WYSIWYG on magento 1.4.0.1.

Faced with the problem of adding an image items in Magento 1.4.0.1 and finally found a solution to this problem.

To address this problem, the trick for the moment is in the file wysiwyg at the core.

in app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php

Replace the line 136 around getImageHtmlDeclaration function with the following:

{code type=css}

public function getImageHtmlDeclaration($filename, $asIs = false)
{
$fileurl = $this->getCurrentUrl() . $filename;
$mediaPath = str_replace(Mage::getBaseUrl(’media’), ”, $fileurl);
$directive = sprintf(’{{media url=”%s”}}’, $mediaPath);
$directive = $fileurl;
if ($asIs) {
$html = sprintf(’‘, $directive);
} else {
$html = $directive;
// $directive = Mage::helper(’core’)->urlEncode($directive);
// $html = Mage::helper(’adminhtml’)->getUrl(’*/cms_wysiwyg/directive’, array(’___directive’ => $directive));
}
return $html;
}

{/code}

And that’s it, although it may be problematic to directly modify a file in the core.

  • Share/Bookmark

This entry was posted on Saturday, July 3rd, 2010 at 4:40 am and is filed under Magento Admin, Magento Templates. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Responses to “Avoid to getting black “skin image” in WYSIWYG on magento 1.4.0.1.”

  1. Gucci watches Says:

    Really inspiring write-up, Thank you !!…

  2. Gucci handbags Says:

    Hello there, I should say it really is a clever posting. I’ll definitely be searching in on this web site yet again quickly….

  3. Spyder Says:

    Thanks! it is helpful to me!…

  4. Adobe Edge Tutorials Says:

    Simply wish to say your article is as astounding. The clearness on your put up is simply spectacular and i can think you’re knowledgeable on this subject.

  5. websites software Says:

    I have been browsing online more than 3 hours nowadays, but I by no means found any interesting article like yours. It is lovely value sufficient for me. In my view, if all webmasters and bloggers made good content as you probably did, the internet can be much more helpful than ever before.

Leave a Reply

« Back to text comment