install works on localhost:8888 but navigation does not

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Locked
jolarti
New Member
New Member
Posts: 7
Joined: Mon Sep 29, 2014 12:07 pm

install works on localhost:8888 but navigation does not

Post by jolarti »

I can't seem to find a proper solution for this.
Installing CMSMS 2 on my localhost (MAMP on a Mac) works perfectly, with all tests and connections to the database passing, but after installation, none of the links or navigation work - because all url's delete the "8888" that I have after my localhost.
I don't want to take off the 8888 in my MAMP settings because I have multiple CMS's installed (and they all work fine on this host).

Any ideas?
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: install works on localhost:8888 but navigation does not

Post by Jo Morg »

jolarti wrote:I don't want to take off the 8888 in my MAMP settings because I have multiple CMS's installed (and they all work fine on this host).
I don't see the point... I have tons of installations of CMSMS on my localhost and they all work fine without having to use non standard ports for that. I keep moving installations around and from and to remote servers without issues either (safe the occasional stubborn hoster that persists in having substandard server environments). What I use is either virtual hosts in WAMP, which I assume it's the same in MAMP, aliases, sub-folders which are the easiest to use, or even mocking domains that I have setup for testing purposes. All work fine and only setting up domains on a local server needed some googling around before I could set them up, but after that it was pretty easy and straightforward.
jolarti wrote:(...) none of the links or navigation work - because all url's delete the "8888" that I have after my localhost (...)
At this point I can't say if it is a bug or as designed, I don't have time to fiddle with that right now but, as you may have noticed, it's a pretty rare requirement and probably not the best way to achieve what you need. It would be the last way of setting up multiple installations of any script I would think of using...
"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!
jolarti
New Member
New Member
Posts: 7
Joined: Mon Sep 29, 2014 12:07 pm

Re: install works on localhost:8888 but navigation does not

Post by jolarti »

I don't understand what you don't "see the point" of.

Do you mean: you don't see the point of keeping 8888 in MAMP?
Or do you mean you don't know what point is causing an error..?
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm

Re: install works on localhost:8888 but navigation does not

Post by Jos »

Don't know for sure but maybe it helps to add this line to your config.php

Code: Select all

$config['root_url'] = 'http://localhost:8888';
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: install works on localhost:8888 but navigation does not

Post by velden »

I could reproduce this issue.

It has been fixed already in version 2.2 which currently is in public beta.

For CMSMS 2.1.x the fix/work-around is setting the $config['root_url'] like Jos already suggested.

Note that you can use a protocol relative url if you want to do so
e.g.:

Code: Select all

$config['root_url'] = '//localhost:8888'
If you're using multiple host/domain names then have a look at host_whitelist setting and note that you should include the port number there but NOT the protocol!

e.g.:

Code: Select all

$config['host_whitelist'] = 'localhost:8888,domain2:8888';
Locked

Return to “The Lounge”