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.]