Can we save images to CM1 if hostname is the key for URL path?

We have deployed CM1 and we are creating templates. When we attempt to upload images and save the image as an asset via the tiny MCE editor the image fails to save. Looking at the image path it appears the editor uses a fully qualified URL to reference the asset, as opposed to a relative URL. If we change the DNS/NAT mapping to equate the hostname with both the internal and external IP addresses of CM1 and our external access is over port 80 will we be able to save the image successfully?

Assuming that you have configured CM1 to run on port 80 already.

Inline links in CM1 (links where you are inserting a link to an Asset like an image or something into a Rich Text box for example) use the fully qualified hostname of the CM1 server. The actual URL used will depend on how the CM1 server is accessed.

For example, if you access CM1 with this address:

http://127.0.0.1/cm

if you were inserting a link to an image asset in a rich text field using the following address:

[some path]/[some image].png

Then the generated link would include the [http://127.0.0.1/some path]/[some image].png

In a forwarding / proxy network topology like you describe above, you would need to use the same hostname on both sides of the firewall using the internal IP on the internal side and the external ip on the public side. The forwarding mechanism needs to pass the hostname to the CM1 server.

For example:

Internal DNS:
192.168.2.99 cm1.myorg.edu

External DNS:
4.4.4.99 cm1.myorg.edu

Forward public cm1.myorg.edu on port 80 to cm1.myord.edu internal port 80. Requires a little network admin work but it should address the problem that you describe.

Just a followup question on this. Why do relative paths work in the CSS default file (e.g. background: #CED3D3 url(images/main-wrapper-bg.jpg) repeat;) but img src=“images/791902-3.jpg” doesn’t work as a path in the rich text widget?

I have a jquery slider that has a bunch of HTML and associated images that I want to drop into a Rich Text or HTML widget but all the image links break when I do that.

Hey Dan,

When you specify a URL without an opening forward slash, the URL will be relative to the containing file’s location on the server’s filesystem. So, for example, your default CSS file will be located at “/web_resources/themes/[your_theme]/style.css”, therefore a URL of “images/791902-3.jpg” within that file will ultimately resolve to “/web_resources/themes/[your_theme]/images/791902-3.jpg”.

To link to that file from any other location (e.g. directly from any of your pages), just use the absolute path with the opening forward slash:

“/web_resources/themes/[your_theme]/images/791902-3.jpg”