We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28840
    • 46 Posts
    Can someone please confirm this:
    1. Create custom Filesystem-based media source with basePath = /assets/ and MODx baseUrlRelative to YES and write down it's ID.
    2. Create snippet and call the media source thru it:
    $ms = $modx->getObject('modMediaSource',array('id'=>$media_source_id));
    $ms->getBasePath();
    

    3. Run the snippet


    Do you get the basePath or php error stating:
    PHP Fatal error: Call to a member function sanitizePath() on a non-object in core/model/modx/sources/modfilemediasource.class.php on line 45
    ?

    I even went to modfilemediasource.class.php and did var_dump($this->fileHandler) and received NULL ? ? ? It looks like the modfilemediasource.class.php function initialize() is not run. Can anyone confirm this please?

    Sumoborac

    [ed. note: sumoborac last edited this post 10 years, 2 months ago.]
    • What do you mean by "MODX base path ON"?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 28840
        • 46 Posts
        baseUrlRelative - Yes