Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: $rooturl

Aw: $rooturl 4 years 4 weeks ago #88002

  • quaint
  • quaint's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0

'components' => array(
...
'request' => array(
'baseUrl' => 'www.example.com',
),
)

Hi Mazi,

I've just added this in to the config.php file; however, when I input the hostname all css dies - see linked screenshot - and, worst of all, it doesn't seem to even resolve the issue.

If I use the hostname and the directory (adding 'surveys.northerndeanery.nhs.uk/pineapple' then the formatting returns, but the problem still isn't fixed.

If I'm not missing something (in httpd.conf or config.php) then I'm a bit lost as to where to go next.

I can make a contribution to the project from my organisation to get this fixed; it worked just fine with 1.92+ and I'm a little lost as to why I'm having so much trouble with 2.00+
Last Edit: 4 years 4 weeks ago by quaint.
The administrator has disabled public write access.

Aw: $rooturl 4 years 4 weeks ago #88004

  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • Moderator Lime
  • Posts: 9586
  • Thank you received: 1375
  • Karma: 390
I think you have to set all url in config.php

Look at end of the config-default.php,
And set all url to your url.

Think actually,
In config-default:
$config is set to surveys.northerndeanery.nhs.uk/templates because Yii::app()->baseUrl are surveys.northerndeanery.nhs.uk/ at this time, and is modified only after in config.php.

Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.

Aw: $rooturl 4 years 4 weeks ago #88012

  • quaint
  • quaint's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
I'm sorry, I'm now utterly lost.


if I put the code
 
'request'=>array(
'baseUrl'=>'http://surveys.northerndeanery.nhs.uk',
),
 

into the config.php file, I get no template or css, essentially a text-only LimeSurvey admin screen.

If I change the code to
 
'request'=>array(
'baseUrl'=>'http://surveys.northerndeanery.nhs.uk/pineapple',
),
 

then everything looks normal, but the surveys are still listed as
http://80.194.247.xxx
in both the invite emails and in the survey title page.

If I change the config.php to read
 
'request'=>array(
'baseUrl'=>'http://surveys.northerndeanery.nhs.uk',
),
 

and then modify the config-defaults.php to point to the subdirectory /pineapple/templates as you suggest below, then I get the templates and the CSS and everything looks normal, but the URLs are still pointing to the IP address, rather than surveys.northerndeanery.nhs.uk/.

Am I still missing something?
Last Edit: 4 years 4 weeks ago by quaint. Reason: missed some apostrophes
The administrator has disabled public write access.

Aw: $rooturl 4 years 4 weeks ago #88021

  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • Moderator Lime
  • Posts: 9586
  • Thank you received: 1375
  • Karma: 390
quaint wrote:
and then modify the config-defaults.php to point to the subdirectory /pineapple/templates as you suggest below, then I get the templates and the CSS and everything looks normal, but the URLs are still pointing to the IP address, rather than surveys.northerndeanery.nhs.uk/.
What survey URL ? In the mail ?

Maybe some bug reporting to do ?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.

Aw: $rooturl 4 years 4 weeks ago #88024

  • quaint
  • quaint's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
Both on the invitation emails and on the title screen for surveys, they're listing as IPs.

Do I need to change anything in my apache configuration?

Still puzzled as to why it doesn't work in V2.00 but was functional in 1.92+.

Will submit another bug report.
The administrator has disabled public write access.

$rooturl 4 years 4 weeks ago #88031

  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • Moderator Lime
  • Posts: 9586
  • Thank you received: 1375
  • Karma: 390
Got it !!

In config.php :
'components' => array(
        'request'=>array(
            'hostInfo'=>'http://surveys.northerndeanery.nhs.uk',
        ),
hostInfo is used for createAbsoluteUrl

For surveylisting, we just use createUrl, this make url like this : /index.php/.... and it's OK.

But for admin page, we force the absolute url, maybe it's not a big idea.

Only use absolute url for "survey url" in survey description and in survey mail.

Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.
The following user(s) said Thank You: quaint

Aw: $rooturl 4 years 4 weeks ago #88032

  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • Moderator Lime
  • Posts: 9586
  • Thank you received: 1375
  • Karma: 390
quaint wrote:
Will submit another bug report.
Plesa, give the number , or best the complete bug report link (with number).

Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.

Aw: $rooturl 4 years 4 weeks ago #88034

  • quaint
  • quaint's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
Success!

That seems to do the job!

Thanks very much. I think now it should just be a case of updating the documentation to say "hostinfo" rather than "baseUrl".

I'd actually submitted that bug report mere seconds from noticing your reply here:

http://bugs.limesurvey.org/view.php?id=6844
The administrator has disabled public write access.

Aw: $rooturl 4 years 4 weeks ago #88035

  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • Moderator Lime
  • Posts: 9586
  • Thank you received: 1375
  • Karma: 390
quaint wrote:
Thanks very much. I think now it should just be a case of updating the documentation to say "hostinfo" rather than "baseUrl".
Please,

Do it, docs is a wiki :).

And for bug report, think this solution is not so easy. We have to use a $config for rooturl like in 1.92.

Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.

$rooturl 2 years 5 months ago #110407

  • Gordon55M
  • Gordon55M's Avatar
  • Offline
  • Junior Lime
  • Posts: 30
  • Thank you received: 1
  • Karma: 0
This worked for me, thanks so much!
The administrator has disabled public write access.
Time to create page: 0.778 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form