Open multimedia opened 13 years ago
multimedia submitted:
i noticed the last url to the image it combined:
the url is: http://www.domain.com/assets/images/default/assets/images/orcon/level3/image.jpg
filemanager_url from systemsettings = assets/images/default/
and the image TV value = assets/images/orcon/level3/image.jpg
this is strange because im looking at a page from/in context 'orcon'. it should not get the filemanager_url from systemsettings there.
Also strange because this image should be passed trough phpthumbof and should have something like assets/components/phpthumbof/ in the url
everettg_99 submitted:
This might be related to this issue: http://bugs.modx.com/issues/3589
slackero submitted:
Same experience here:
Revolution MODX Revolution 2.2.1-pl (traditional) phpthumbof-1.3.2-pl
Template Var Input Type Image @basePath assets/content/ basePathRelative Yes baseUrl assets/content/ baseUrlRelative Yes@
My modx site is installed in subdirectory @http://example.com/MODX@
A false path is given. It seems not to be the fault of phpThumbOf. Seems the file path is set wrong by TV by prepending MODX_BASE_URL to basePath while MODX_BASE_PATH is given too (which is the full path into the subdirectory MODX
So it fails because image cannot be found, results in something like this: @/sites/myvhost/MODX//MODX/assets/content/myimage.jpg@
Correct would be: @/sites/myvhost/MODX/assets/content/myimage.jpg@
apollo21 submitted:
Any solution? I have the same problem :(
multimedia created Redmine issue ID 3481
The bug that occured from release Revolution-2.0.6-pl regarding image TV url values, filemanager_path and filemanager_url seems to work better now in Revolution-2.0.7-pl. But it still has some problems. Maybe this has to do with using different contexts and filemanager_path and filemanager_url settings per context.
Systemsettings:
h3. Context
This are the systemsettings for the contexts regarding the filemanager:
Context 'orcon':
Context 'haen':
h3. Folder overview
Here is an overview of the image folder structure inside httpdocs:
/assets/images/default/ /assets/images/orcon/ /assets/images/orcon/level1/ /assets/images/orcon/level1/image.jpg /assets/images/orcon/level2/ /assets/images/orcon/level2/image.jpg /assets/images/orcon/level3/ /assets/images/orcon/level3/image.jpg /assets/images/haen/ /assets/images/haen/level1/ /assets/images/haen/level1/image.jpg /assets/images/haen/level2/ /assets/images/haen/level2/image.jpg /assets/images/haen/level3/ /assets/images/haen/level3/image.jpg
h3. Description
This is what happens when im editing/creating a resource in context 'orcon' with a template that has an image TV attached to it:
Now a different situation, where im showing the image scaled by phpthumbof on the website. Everything is the same as above, only i select an image from assets/images/orcon/level3/ I'm using the phpthumbof output filter like this:
But after going back to the manager editing the same resource and saving it:
Possible solution:
When browsing for an image to use as value for an image TV. Always use the full url from the MODx base_url when filemanager_url is set and filemanager_url_relative is Yes.
So that after selecting an image the image TV value is the complete url eg. assets/images/orcon/level3/image.jpg If the code to do that combines the filemanager_url with the relative url from there to the image look if the filemanager_url ends with a slash and the relative url from the filemanager_url to the image starts with a /. If so remove one / and then combine. From that url generate the thumbnail to use below the image TV input field.
That might solve the problem.
Could it be the extra / is the base_url that been put in the wrong place?