1

I've posted this issue to the Ellis Lab Forums, but thought I'd also post it here in case it helps. As best as I can tell, images placed using the Rich Text Editor's 'image' button do not properly honour the directory path. It would appear that the image's src url is derived from the path specified in File Upload Preferences at the time of entry, but that it is somehow hard-coded at that point, not set as a dynamic variable. The result is that the RTE-placed images are not portable between servers.

An example: Suppose I am building a site on a local server, which will then be moved to a remote server. When the site is moved between servers all the paths (such as File Upload Preference directory paths) get adjusted to match the new server by means of Focus Lab's Master.Config system. Now, working locally I place two images in a blog post: one placed in an RTE field via the 'image' button, and one placed via a 'file' field. (It makes no difference for this example whether they are new uploads or pre-existing images; the result is the same). I reference each image in a page template, via custom field tags – let's call them {my_rte_field} and {my_file_field}.

I then move the site to the remote server. What I find when I check the page source code is that the src url for the image placed via the {my_file_field} tag is correctly represented as http://www.myremotedomain.com/path/to/image/file.jpg, but the image that was placed as part of the {my_rte_field} tag has the incorrect src url of http://localdevserver/path/to/image/file.jpg. As a result, the image does not display on the remote site.

It took me a while to notice this because I was viewing the remote site in a browser on the same machine that was running the development server. So of course the image was available, albeit from the wrong server — but that wasn't obvious at a casual glance. Only when I checked the remote site on my iPad did the problem reveal itself.

RTE Bug? Or am I missing something here?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.