Errors with migxResourceMediaPath and MODX 2.6.1
I have a site which has been using the migxResourceMediaPath as a location for images however, this seems to have become unusable in recent MODX upgrade to 2.6.1. Files are no longer located under the Media Source.
The call for basePath and baseURL have been unchanged are as follows:
[[migxResourceMediaPath? &pathTpl=assets/foldername/resourceimages/{id}/]]
Whilst this did list images under the media source there the following error would appear in the logs;
/paas/site/www/core/cache/includes/elements/modsnippet/13.include.cache.php : 69) [migxResourceMediaPath]: docid could not be determined.
However there is a new error appearing:
/paas/site/www/core/model/modx/sources/modfilemediasource.class.php : 53) PHP warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/paas/site)
Plus the images are now no longer listed under the Media Source although the folder still exists...
If I use PHP 5.6 I can use the upload but I can't actually access the media source if I use image upload. Works fine if you Ajaz upload but not for individual images.
Any suggestions?
I have exact this same problem. After updating from 2.5.0 to 2.6.4 I get the error "Server error. Upload directory isn't writable." when trying to upload an image with the ajaxupload (red button) from migx. (image upload directory isnt writable)
Also when switching form PHP 5.3 to 7.0 the uploadbutton disappears (image probleem 2)
,
On the media source for this gallery I use migxResourceMediaPath.
assets/uploads/[[migxResourceMediaPath? &pathTpl={id}/]]
[2018-06-25 08:15:21] (ERROR @ /home/*******/gearbox/cache/includes/elements/modsnippet/8.include.cache.php : 69) [migxResourceMediaPath]: docid could not be determined.
the php7 issue with the upload form is fixed with #317
Thanx Mark :) The problem with relative paths on the mediasource not working still exists.
When I use the absolute path in this example it works fine. But when I change it to the relative example, then no folder/file is created on upload.
Absolute: basePathRelative: False basePath: [[migxResourceMediaPath? &pathTpl=`/home/domain/public_html/assets/photogallery/{id}/`]]
Relative: basePathRelative: True basePath: [[migxResourceMediaPath? &pathTpl=`assets/photogallery/{id}/`]]
Tried the fix Mark-H but unfortunately it didn't work. Would be good to get this resolved as the work round for the client is a little frustrating.
Site is now on 2.6.5
Same here since using PHP 7.x.
BTW: The missing upload button is related to #277 (http instead of https in line 10 in /core/components/migx/templates/mgr/iframechunks/ajaxupload.html)