Body id tag breaking?

Body id tag breaking?

by Stuart Anderson -
Number of replies: 6
Hi there,

I have a rather strange problem. My <body id=""> identifies are being re-written in the following way:
<body id="https:--elearn.cs.man.ac.uk-%7Estuart-user-view"
class="https:--elearn.cs.man.ac.uk-%7Estuart-user course-1 nocoursepage editing lang-en_utf8">
<div id="page">
The "https:--elearn.cs.man.ac.uk-%7Estuart" part related to the testing directory where I am running moodle from. I don't have this problem if I run moodle from the root of a webtree. I'm not sure what it is related to. Can any body suggest how I can stop this from happening as it breaks some of the css (standard as well as custom)? I've searched for help and in the bug tracker but couldn't find out what was exactly going on.

Many thanks,

Stuart
Average of ratings: -
In reply to Stuart Anderson

Re: Body id tag breaking?

by Stuart Anderson -
Actually, I'm going to log this as a bug. It only appears to happen on certain pages, for example the user profile page, but only if I go through the browser users admin option. If I click on a user name in a posting it sets the ID correctly.
In reply to Stuart Anderson

Re: Body id tag breaking?

by Urs Hunkler -
Picture of Core developers
Stuart, I remember to have seen this issue with wrong Moodle config settings and/or wrong server vhost settings. Please check these settings very carefully.
In reply to Urs Hunkler

Re: Body id tag breaking?

by Stuart Anderson -
Yes, that's where I thought the problem would be. I shall check them a second time...

Thanks.

--Stuart.
In reply to Urs Hunkler

Re: Body id tag breaking?

by Stuart Anderson -
Still not working and I can't see anything suspect in the moodle config. My colleague assures me that the vhost settings on apache are fairly standard.

I'll live with it for now...

--Stuart.
In reply to Stuart Anderson

Re: Body id tag breaking?

by Urs Hunkler -
Picture of Core developers
When you for example add a slash at the end of the setting of wwwroot in your Moodle config.php file you get this strange body IDs.

should be:
$CFG->wwwroot = 'http://moodle.server.net';

wrong:
$CFG->wwwroot = 'http://moodle.server.net/';

I could reproduce the error when I added the slash. May be you can solve your issue this way?
In reply to Urs Hunkler

Re: Body id tag breaking?

by Stuart Anderson -
Mmmm... I think that this might be the problem. Thought not quite because of the reason you suggested. My wwwroot is:

$CFG->wwwroot = 'http://elearn.cs.man.ac.uk/~stuart';

Where we have installed multiple installs else where and had one or more not at the web tree root, we haven't had this problem. This install is obviously in my /home/stuart/public_html directory. Do you think that the tilda (~) might be freaking moodle out?

--Stuart.