[invalid] CMSMS in a subdirectory: wrong css images url

Forum rules
Only administrators can post or move items here.
Post Reply
User avatar
Franck
Dev Team Member
Dev Team Member
Posts: 255
Joined: Tue Jun 12, 2007 1:29 pm
Location: France

[invalid] CMSMS in a subdirectory: wrong css images url

Post by Franck »

Tested on V2.0 r10036, compared with a V1.12 installation, with the very same settings and hosting.

When I put CMSMS in a subdirectory (say /cmsms/), pointing the domain name to this directory, root_url is then = domain.tld

CSS url is ok, but images called in the css with [[root_url]]/path/to/image.jpg results in a wrong path : domain.tld/cmsms/path/to/image.jpg

On a V1.12, with the same settings, CSS images URLS are ok, images are displayed.

Edited by Tomek: Set invalid.
Last edited by Franck on Mon Jun 15, 2015 8:20 am, edited 1 time in total.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: CMSMS in a subdirectory: wrong css images url

Post by Jo Morg »

I cannot reproduce this:
I have ALL my tests in localhost in sub-directories and for instance a installation under http://localhost/cmsms with a test stylesheet with

Code: Select all

/*[[root_url]]*/
shows on the source code the expected

Code: Select all

/* cmsms stylesheet: foo modified: 06/14/15 20:02:56 */
/*http://localhost/cmsms*/
Did you clear the cache after moving?
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
Franck
Dev Team Member
Dev Team Member
Posts: 255
Joined: Tue Jun 12, 2007 1:29 pm
Location: France

Re: CMSMS in a subdirectory: wrong css images url

Post by Franck »

I did cleared the cache.

But I think you're missing the point: while my cmsms install is in a subdirectory, the cmsms site responds at the domain.tld, not subdirectory. The only elements not called properly are CSS images, all the rest is fine.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3483
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: CMSMS in a subdirectory: wrong css images url

Post by velden »

So you're saying that:

In page content {root_url} would render to 'http://domain.tld' while [[root_url]] in stylesheets renders to 'http://domain.tld/cmsms'?

Though I didn't code anything in cmsms it seems very unlikely that a different logic is used to determine the root_url.

Could you do a double check like the code JoMorg posted?
For both {root_url} in page content/template and [[root_url]] in stylesheet.

Then look at the real output (html source, source of stylesheet) and NOT that of a web inspector like F12, Developer Tools, Firebug etc.
User avatar
Franck
Dev Team Member
Dev Team Member
Posts: 255
Joined: Tue Jun 12, 2007 1:29 pm
Location: France

Re: CMSMS in a subdirectory: wrong css images url

Post by Franck »

Hum, I tried once more (put back the install in a subdirectory, pointing domain to it), and everything is fine now. Don't know what happened.

Sorry for the noise. :)
Post Reply

Return to “Closed Issues”