webguys-de / EasyTemplate

42 stars 13 forks source link

Wrong image URL in "text + picture" area #25

Closed gfobe closed 7 years ago

gfobe commented 8 years ago

When I configure an image in the text+picture area it uploads the image correcty, but after save in the template in the backend and in the frontend there is a wrong delimiter in the image URL (example: http://localhost/media/easytemplate\1\6\image1.png). Seems to be a Windows problem.

Magento 1.9.2.4 @ Firefox 44 Win7/64 & PHP5.6.11

timmeyy23 commented 7 years ago

We have the same problem.

tobi-pb commented 7 years ago

Could you guys fix it and make a merge request? i'm not working on a windows machine :)

timmeyy23 commented 7 years ago

I'am not sure if its only a windows problem. But I will try to fix it.

tobi-pb commented 7 years ago

Thanks a lot!

gfobe commented 7 years ago

Fixed it. Somebody uses directory separators in URLs.

@tobi-pb please have a look at following thing: At the moment for the output of the images Webguys_Easytemplate_Helper_File::getDestinationUrl() is used, because in easytemplate.xml there is <input_renderer>easytemplate/input_renderer_file</input_renderer> . But we have also a class Webguys_Easytemplate_Model_Input_Renderer_Validator_Image uses images in Magento media directory and it seems to me that the class is never used at the moment