Recent Topics

1 Aug 27, 2008 16:46    

My b2evolution Version: 2.x

I've just installed B2Evolution for the first time. Unfortunately, the setup is looking for the skin stylesheets. It appears to be trying to build a path to where I originally downloaded the files before uploading them to my server. This is what I'm getting:

<link rel="stylesheet" href="../../../../../Desktop/blogs/skins/style.css" type="text/css" />

When, of course, it should be looking in "./skins/" and the directory for the selected skin.

Anyway, I'm having trouble finding where I can fix this. What files and variables should I be looking for? (Or is there actually a way to fix this through the back office?)

2 Aug 27, 2008 17:04

Hi Shhalahr,
Welcome to the forums.

This is a weird error. I can't remember having seen it before.
You may want to check $baseurl in /conf/_basic_config.php.
If you can't solve it I advise you to delete all the files from the server. Download a fresh copy of B2evolution and upload those files.

Good luck

3 Aug 29, 2008 15:09

I managed to do that. $baseurl had a correct URL. (Wouldn't an incorrect $baseurl have messed up a whole lot more than just the stylesheets, anyway?)

If the skin directory location is supposed to be assembled using $baseurl, then whatever bit of code that does that is way off. I just don't know where in the system that assembly is supposed to happen.

I guess it's down to a more heavy-duty search or that re-install. :-/

4 Aug 29, 2008 20:42

Okay, I think I found the problem line. The bit that inserts the stylesheet is in "_html_header.inc.php". It's currently hardcoded to the directory listed above. I have no idea how that happened.

Now I just have to make sure I'm using the right variables/functions for assembling the proper URL. I've already found the "$skins_url" variable which directs to the folder the skins are kept in. I just need to put that together with the bit that saves the skin that the blog uses. I'm not sure about that part, yet, though.

Until I'm sure I'm making the right call, though, I'll just hardcode to the skin I want. I'm tired of that raw, unstyled HTML. Yuk.

5 Aug 29, 2008 21:38

???

You really are doing something wrong if you need to hardcode the stylesheet.

Check your source for the url in <base>

¥

6 Aug 29, 2008 21:54

Ah! There ya go. I missed that the PHP function I needed was already being called in a <base> tag. Thoguht I'd need to make some PHP variable call in the <link> tag. Never really used <base> tags before, so it wasn't something I was looking for.

Everything's working now. Thanks for the help! :D

7 Aug 29, 2008 23:28

urm ... you should only have needed to change $baseurl in /conf/_basic_config.php ?

Afwas wrote:

You may want to check $baseurl in /conf/_basic_config.php.

¥

8 Aug 30, 2008 15:26

No, $baseurl was always correct. It's just that somehow—I don't know how it happened, but somehow it did—, the part of the source code that is supposed to say

<link rel="stylesheet" href="style.css" type="text/css" />

instead literally said

<link rel="stylesheet" href="../../../../../Desktop/blogs/skins/style.css" type="text/css" />


Although the latter was clearly erroneous, I'm sufficiently new to the system that I was unaware that it should have read as the former and that a "<base>" tag would supply the rest of the path. In any case, changing $baseurl would not have affected the results of what I was seeing, since it would still be looking for the stylesheet in a nonexistent location.


Form is loading...