Default config.php causes absolute URLs for files/images

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am

Default config.php causes absolute URLs for files/images

Post by Cerulean »

I noticed when changing from a development domain to the final domain that the URLs broke for all the images and linked files inserted via WYSIWYG (TinyMCE, haven't tested MicroTiny). This is because the images and files received absolute URLs by default.

After some experimenting it seems that in order to achieve relative paths for WYSIWYG images and linked files the config.php has to include the line:

Code: Select all

$config['uploads_url'] = $config['root_url'] . '/uploads';
According to the documentation the line above is the default for $config['uploads_url'] so shouldn't need to be declared in config.php, but it seems that relative URLs don't get applied unless the line is explicitly declared in config.php.

Anyone else experienced this issue?

CMSMS v1.11.7, BTW.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Default config.php causes absolute URLs for files/images

Post by Dr.CSS »

Some times it helps to run the install again but on step 5 DON'T CREATE TABLES OR INSTALL DEFAULT CONTENT...
Post Reply

Return to “The Lounge”