Arastta and its root is inserting images with full URL (in content code), including http protocol and domain:
https://github.com/arastta/arastta/blob/master/admin/controller/common/filemanager.php#l80-l95

Is there any valid reasons for this? From what I can tell it makes quite a few issues, e.g. if changing domain (or using multi-domain), or adding ssl later on.

Maybe it's time to drop line 81-86:
https://github.com/arastta/arastta/blob/master/admin/controller/common/filemanager.php#l81-l86

And change line 93:
https://github.com/arastta/arastta/blob/master/admin/controller/common/filemanager.php#l93

into:
'href'  => '/image/' . utf8_substr($image, utf8_strlen(DIR_IMAGE))


If anyone wants to test they can use the attachment (vqmod).
Tuesday, January 05 2016, 01:27 AM
Share this post:
Responses (2)
  • Accepted Answer

    Tuesday, January 05 2016, 10:12 PM - #Permalink
    Rune, those lines are used to display images, not save them so it doesn't matter if you change domain, SSL etc later.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 05 2016, 10:14 PM - #Permalink
    Sorry, but you are actually wrong Denis. Guess you misunderstood me here, so let's try to clear it up.

    They are used to generate the link to the image inserted by the filemanager into the code/database, e.g. when inserting images in product descriptions, modules and information pages etc.
    Please test it and you will notice they are inserted with full URL, and after adding the mod -> relative URL and still working...

    PS! Take any OC and Arastta database and search for:
    src=& quot ;http

    (should be without the spaces, but forum transforms it then)
    ;)
    The reply is currently minimized Show
Your Reply