我发现以下编辑使其按预期工作,并且也适用于非符号链接(开发)资源:
在与 相同的类中mentiond Mage_Cms_Helper_Wysiwyg_Images
,应用这些补丁:
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- <html>Images.php (<b>Today 4:14:50 PM</b>)</html>
+++ <html><b>Current File</b></html>
@@ -223,7 +223,7 @@
public function getCurrentUrl()
{
if (!$this->_currentUrl) {
- $path = str_replace(Mage::getConfig()->getOptions()->getMediaDir(), '', $this->getCurrentPath());
+ $path = str_replace(realpath(Mage::getConfig()->getOptions()->getMediaDir()), '', $this->getCurrentPath());
$path = trim($path, DS);
$this->_currentUrl = Mage::app()->getStore($this->_storeId)->getBaseUrl('media') .
$this->convertPathToUrl($path) . '/';
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- <html>Images.php (<b>f47f0ff</b>)</html>
+++ <html><b>Current File</b></html>
@@ -68,7 +68,7 @@
*/
public function getStorageRoot()
{
- return Mage::getConfig()->getOptions()->getMediaDir() . DS . Mage_Cms_Model_Wysiwyg_Config::IMAGE_DIRECTORY
+ return realpath(Mage::getConfig()->getOptions()->getMediaDir()) . DS . Mage_Cms_Model_Wysiwyg_Config::IMAGE_DIRECTORY
. DS;
}