2.5 Stylesheets?

Brandon Plewe
Joined: 26 Apr 2007

2.5 Stylesheets?

Posted:09 Feb 2009 (20:06 UTC)
I am upgrading from 2.1RC4 to 2.5. I took the shortcut route, just replacing all of the files except config_inc.php and the storage folder. It took me into the middle of the install.php, but there didn't appear to be much done there.

Now when I view my site, all of the styles (themes and layout) don't work--I just get raw HTML. When I view source, all of the stylesheet links are raw filenames (href="c:\web\...gala_24.css") rather than relative URL's. relative URLs for everything else (images, links, etc.) are fine. Just the stylesheets.

I'm sure there is just a minor pathname setting somewhere that is messed up, but I'm not sure where it is. Any hints?
xing
Joined: 07 Mar 2004

Re: 2.5 Stylesheets?

Posted:15 Feb 2009 (07:27 UTC)
using the shortcut route is not a recommended way of doing an upgrade. we deprecate this for a reason.

in future make sure you follow the upgrade instructions. in fact, i'd recommend you replace your filebase with a clean set of files since we've removed several files since 2.1 which might now interfere with your install.

try removing your cache by removing various folders in temp - best to exchange that with a pristine version of the temp folder and set it writable by apache.

x
Brandon Plewe
Joined: 26 Apr 2007

Re: 2.5 Stylesheets?

Posted:18 Feb 2009 (16:21 UTC)
Perhaps it came across as more of a shortcut than I did. I renamed the entire directory, put the clean 2.5 directory in its place (thus not keeping any stray files from 2.1), and copied the config.php file and storage folder over from the old install. I thought this was what the upgrade documentation suggested.

So the cache in temp was initially empty, although it quickly started to be populated.

So where might the bad pathnames be coming from?
xing
Joined: 07 Mar 2004

Re: 2.5 Stylesheets?

Posted:19 Feb 2009 (17:53 UTC)
are you using a custom theme from 2.1? have you tried using a different theme to test? we've moved some stuff in themes around.

x
rkotenko

Re: 2.5 Stylesheets?

Posted:25 Feb 2009 (18:02 UTC)
Hello, I have the same issue. However, I am working with a CLEAN 2.5 install.

First, the layout was not importing the base.css. The url listed within the agrregate css file is a file listing (C:\docs\...). Then I turned off css aggregating to see if I spot the issue and now all the individual links in my pages have file location hrefs instead of server locations:


<?php
<link media="all" href="C:\docs\bitweaver\themes\inline.css" type="text/css" title="" rel="stylesheet">
</
link>
<
link media="all" href="C:\docs\bitweaver\boards\styles\boards.css" type="text/css" title="" rel="stylesheet">
</
link>
<
link media="all" href="C:\docs\bitweaver\tags\templates\tags.css" type="text/css" title="" rel="stylesheet">
</
link>
<
link media="all" href="C:\docs\bitweaver\themes\styles\clean\clean.css" type="text/css" title="" rel="stylesheet">
</
link>
?>


The same applies to javascript.

This does not occur on my Mac at home. Only on my Windows machine here at work. So I would assume it is some issue with Windows and *nix based OS. Did I configure something improperly or is this a bug? I liked bitweaver at home and wanted to use it here at work, but this is extremely frustrating.
rkotenko

Re: 2.5 Stylesheets?

Posted:25 Feb 2009 (18:31 UTC)
After examining more, it appears that within bit_step_inc.php, BIT_ROOT_PATH is set to $_SERVER - 'VHOST_DIR'- or the dirname of FILE.

What is VHOST_DIR? I cannot find any info about it.
rkotenko

Re: 2.5 Stylesheets?

Posted:25 Feb 2009 (21:37 UTC)
MORE research. :)

For some reason mRawFiles, which are used in the smarty templates to create the links and javacript tags, are being set to the file system path instead of the server and bitweaver path. I made a small workaround for my project (inside of BitThemes::loadAuxFile), but am not quite sure where it REALLY should be changed without possibly affecting everything else; the file that is passed to loadAuxFile has the file system path already in it.
xing
Joined: 07 Mar 2004

Re: 2.5 Stylesheets?

Posted:26 Feb 2009 (07:57 UTC)
thanks for your detailed reports. we don't have many windows testers so it's hard for us to debug such problems.

first question i have: did you modify your output in any way? in my themes/templates/header_inc.tpl it says:

<?php
<link .../>
?>
and not:

<?php
<link ...></link>
?>


i think the problem might be in BitThemes::cleanAuxFiles() in particular this section:

cleanAuxFiles


<?php
1523
:         // convert full file path to URL in mRawFiles hash
1524:         if( !empty( $this->mRawFiles[$pType] )) {
1525:             foreach( $this->mRawFiles[$pType] as $pos => $file ) {
1526:                 if( strpos$fileBIT_ROOT_PATH ) !== FALSE ) {
1527:                     $this->mRawFiles[$pType][$pos] = BIT_ROOT_URL.substr$filestrlenBIT_ROOT_PATH ));
1528:                 }
1529:             }
1530:         }
?>


can you please check the values for BIT_ROOT_PATH and $file? you can do this using the 2 vd() lines below (you will have to turn off CSS and JS packing and joining in /kernel/admin/index.php?page=themes):

cleanAuxFiles debug


<?php
1523
:         // convert full file path to URL in mRawFiles hash
1524:         vd"BIT_ROOT_PATH: ".BIT_ROOT_PATH );
1525:         if( !empty( $this->mRawFiles[$pType] )) {
1526:             foreach( $this->mRawFiles[$pType] as $pos => $file ) {
1527:                 vd$pos.": ".$file );
1528:                 if( strpos$fileBIT_ROOT_PATH ) !== FALSE ) {
1529:                     $this->mRawFiles[$pType][$pos] = BIT_ROOT_URL.substr$filestrlenBIT_ROOT_PATH ));
1530:                 }
1531:             }
1532:         }
?>

Anonymous

Re: 2.5 Stylesheets?

Posted:26 Feb 2009 (14:09 UTC)
I copied those link values from Firebug, which adds that extra In the actual source, it is <link ...="" />

After running the vd function, I see that my BIT_ROOT_PATH is C:\docs\bitweaver, the BIT_ROOT_URL is /bitweaver/ and the result of the vd function is


<?php
string 
'1: C:\docs\bitweaver\util\javascript\bitweaver.js'
string '40: C:\docs\bitweaver\util\javascript\libs\tabpane.js'
string '50: C:\docs\bitweaver\util\javascript\libs\fat.js'
string '600: C:\docs\bitweaver\fckeditor\jscripts\fckeditor.js'
string '1: C:\docs\bitweaver\themes\layouts\gala_13.css'
string '300: C:\docs\bitweaver\themes\inline.css'
string '301: C:\docs\bitweaver\boards\styles\boards.css'
string '302: C:\docs\bitweaver\tags\templates\tags.css'
string '998: C:\docs\bitweaver\themes\styles\basic\basic.css')
?>


These confirm the values in my <links>.</links>
rkotenko

Re: 2.5 Stylesheets?

Posted:26 Feb 2009 (18:31 UTC)
Yet more info.

Changing what is placed into mAuxFiles in cleanAuxFiles works for when the css and js is unpacked. That is, I modified the code to look like:


<?php
if( strpos$fileBIT_ROOT_PATH ) !== FALSE ){
  
$this->mRawFiles[$pType][$pos] = BIT_ROOT_URL.substr$filestrlenBIT_ROOT_PATH ));
} else {
  
$this->mRawFiles[$pType][$pos] =  $_SERVER['SERVER_NAME']. str_replace('\\''/'BIT_ROOT_URL.substr$filestrlenBIT_ROOT_PATH )));
}

// there is a http in that string as well, but the forum won't let me put it in.
?>


This sets the links to be correct. However, when I switch the css and js to be packed, the link href is set to:


<?php
href
="/bitweaver/storage/themes/f946c00590d51aa9c9380a7519f16077.css"
?>


So packed is set elsewhere. Not sure if there is place farther upstream where it can affect both or not, but the issue for unpacked and packed appear related, yet separate. If I change the return value for getCacheUrl within BitCache to add http and the $_SERVER, the issue is resolved for packed as well. This is just a workaround because the issue seems to be that $this->mUrl is set only to the directory for bitweaver and not the entire domain plus subdirectory.

Of course, there is still an issue that the @import in basic.css refers to a file system path to base.css. I am going to workaround that next. :)

Please excuse any ignorance. I just started using bitweaver a few days ago. Nothing like debugging code where you have no idea how it runs. :)
  Page 1 of 2 »1 2 
Post
If you are already registered, please enter your login credentials.
Anonymous Post