Problem detected in Mage_Cms_Helper_Wysiwyg_Images::convertIdToPath
The kernel code is as follows.
public function convertIdToPath($id) { $path = $this->idDecode($id); if (!strstr($path, $this->getStorageRoot())) { $path = $this->getStorageRoot() . $path; } return $path; }
And the fix is to use realpath when getting the storage root as follows.
public function convertIdToPath($id) { $path = $this->idDecode($id); $realpath = $this->getStorageRoot(); if (is_link(rtrim($realpath,'/'))) { $realpath = realpath($realpath); } if (!strstr($path, $realpath)) { $path = $realpath . $path; } return $path; }
So, we did rewrite Mage_Cms_Helper_Wysiwyg_Images and use the updated convertIdToPath function. I found the original solution on a German site , but it will break if you say that you have a dev system without links and another system with a link.
dmanners
source share