Double Theme Name In Media Path In OctoberCMS

- 1 answer

I am sure this is a fault on my side but I would like to see if anyone have any idea how to find the error.

I am using my own theme, based on some other theme.

When I upload files in the media manager in october cms it seem to be working just fine but when I try to get the path, example:

<img src="{{ 'myimg.png' | media }}"/>

it returns the path:

When the file is actually located at:

it looks to me like the theme-name is inserted twice, but I can't seem to find anything wrong in the configurations or anything.

So hopefully that is enough information to work with, I will be happy to fill in any missing information but I don't know what more is needed.



Turns out it was a bug, and from version 447 it is fixed (I have tried and verified that is the case). Thanks to @LukeTowers for pointing it out!

On builds before 447, the way I found to solve it, was to change in 'webroot/october/config/cms/cms.php' from relative to absolute path, since it is on the server where it will be running that kind of works, and I still have no clue why the relative doesn't work for the case mentioned under storage:

'storage' => [
    'media' => [
        'folder' => 'media',
        //'path'   => '/storage/app/media',
        'path'  => '',

Just wanted to leave it for completeness so that anyone else having the problem might either be helped or even explain the parts I can't.