Skip to:
Content
Pages
Categories
Search
Top
Bottom

Stylesheet Issues

Viewing 25 replies - 1 through 25 (of 26 total)
  • @netweb

    Keymaster

    You should not have an issue using XAMPP, that said though can you deactivate bbPress, delete bbPress and install it again (You won’t lose any bbPress data).

    How is it now?

    @tkrivickas

    Participant

    Hi,

    This is definitely a bug in bbp 2.5 on Windows. 2.4.1 does not have this issue. You can reproduce it by reverting to 2.4.1 (works again) -> update to 2.5 (doesn’t work again).

    <link rel="stylesheet" id="bbp-default-css" href="http://localhost/wordpress37/wp-content/C:devhtdocswordpress37wp-contentpluginsbbpress/templates/default/css/bbpress.css?ver=2.5-5199" type="text/css" media="screen">

    Windows 7 x64, httpd+php+mysqld, latest stable WP, BP, BBP

    @focallocal

    Participant

    i think i am having the same issue, although i dont understand what windows would have to do with it.

    i updated and the styling on my site was broken. if i deactivate bbpress it comes back to normal. here’s some screen shots: http://imgur.com/a/4SNAC

    notice after the update the headers have turned blue, the outlines of all elements have gone and the image in the top left of the header has moved to the top of the page. the site is: http://www.focallocal.org

    @netweb

    Keymaster

    Yes, it is a bug in bbPress 2.5, we have a patch in and ready for bbPress 2.5.1

    Details are here if you want to apply the patch yourself:
    https://bbpress.trac.wordpress.org/ticket/2481

    If not bbPress 2.5.1 is not far away….

    @netweb

    Keymaster

    ps. If you could test that patch that would be great, I have tested it on XAMPP, Apache, IIS and a couple of other systems but we’d like some feedback on the patch before we release 2.5.1 to make sure we haven’t broken something else. 🙂

    @focallocal

    Participant

    i’ve copied those files across but haven’t got the patch to work. i’ll post the changes i made, perhaps you can see if i missed something

    @focallocal

    Participant
    function bbp_enqueue_style( $handle = '', $file = '', $dependencies = array(), $version = false, $media = 'all' ) {
    
    	// No file found yet
    	$located = false;
    
    	// Trim off any slashes from the template name
    	$file = ltrim( $file, '/' );
    
    	// Make sure there is always a version
    	if ( empty( $version ) ) {
    		$version = bbp_get_version();
    	}
    
    	// Loop through template stack
    	foreach ( (array) bbp_get_template_stack() as $template_location ) {
    
    		// Continue if $template_location is empty
    		if ( empty( $template_location ) ) {
    			continue;
    		}
    
    		// Check child theme first
    		if ( file_exists( trailingslashit( $template_location ) . $file ) ) {
    			$located = trailingslashit( $template_location ) . $file;
    			break;
    		}
    	}
    
    	// Enqueue if located
    	if ( !empty( $located ) ) {
    
                    $content_dir = constant( 'WP_CONTENT_DIR' );
    
                    // IIS (Windows) here
                    // Replace back slashes with forward slash
                    if ( strpos( $located, '\\' ) !== false ) {
                            $located     = str_replace( '\\', '/', $located );
                            $content_dir = str_replace( '\\', '/', $content_dir );
                    }
    
    		// Make path to file relative to site URL
    		$located = str_replace( $content_dir, WP_CONTENT_URL, $located );
    
    		// Enqueue the style
    		wp_enqueue_style( $handle, $located, $dependencies, $version, $media );
    	}
    
    	return $located;
    }
    
    /**
     * Enqueue a script from the highest priority location in the template stack.
     *
     * Registers the style if file provided (does NOT overwrite) and enqueues.
     *
     * @since bbPress (r5180)
     *
     * @param string      $handle    Name of the script.
     * @param string|bool $file      Relative path to the script. Example: '/js/myscript.js'.
     * @param array       $deps      An array of registered handles this script depends on. Default empty array.
     * @param string|bool $ver       Optional. String specifying the script version number, if it has one. This parameter
     *                               is used to ensure that the correct version is sent to the client regardless of caching,
     *                               and so should be included if a version number is available and makes sense for the script.
     * @param bool        $in_footer Optional. Whether to enqueue the script before </head> or before </body>.
     *                               Default 'false'. Accepts 'false' or 'true'.
     *
     * @return string The script filename if one is located.
     */
    function bbp_enqueue_script( $handle = '', $file = '', $dependencies = array(), $version = false, $in_footer = 'all' ) {
    
    	// No file found yet
    	$located = false;
    
    	// Trim off any slashes from the template name
    	$file = ltrim( $file, '/' );
    
    	// Make sure there is always a version
    	if ( empty( $version ) ) {
    		$version = bbp_get_version();
    	}
    
    	// Loop through template stack
    	foreach ( (array) bbp_get_template_stack() as $template_location ) {
    
    		// Continue if $template_location is empty
    		if ( empty( $template_location ) ) {
    			continue;
    		}
    
    		// Check child theme first
    		if ( file_exists( trailingslashit( $template_location ) . $file ) ) {
    			$located = trailingslashit( $template_location ) . $file;
    			break;
    		}
    	}
    
    	// Enqueue if located
    	if ( !empty( $located ) ) {
    
    				$content_dir = constant( 'WP_CONTENT_DIR' ); 	 
    		                // IIS (Windows) here 
     		                // Replace back slashes with forward slash 
     		                if ( strpos( $located, '\\' ) !== false ) { 
     		                        $located     = str_replace( '\\', '/', $located ); 
     		                        $content_dir = str_replace( '\\', '/', $content_dir ); 
     		                } 
    
    		// Make path to file relative to site URL
    		$located = str_replace( $content_dir, WP_CONTENT_URL, $located );
    
    		// Enqueue the style
    		wp_enqueue_script( $handle, $located, $dependencies, $version, $in_footer );
    	}
    
    	return $located;
    }
    
    /**
     * This is really cool. This function

    @netweb

    Keymaster

    @focallocal Thanks, looking at your code now.

    What software package and version are you using? eg. XAMPP 1.8.3

    @netweb

    Keymaster

    It looks like you have patched the file correctly.

    Can you view the source and get the stylesheet path and paste it here:

    eg.
    A ‘failed’ example
    <link rel="stylesheet" id="bbp-default-css" href="http://localhost/wordpress37/wp-content/C:devhtdocswordpress37wp-contentpluginsbbpress/templates/default/css/bbpress.css?ver=2.5-5199" type="text/css" media="screen">

    A ‘working’ example:
    <link rel='stylesheet' id='bbp-default-css' href='http://127.0.0.1/wp-content/plugins/bbpress/templates/default/css/bbpress.css?ver=2.5-5199' type='text/css' media='screen' />

    @thetechnoman

    Participant

    Hello,

    i have issues too with the new update.

    It looks like that:

    http://i.epvpimg.com/w2Bfd.png

    I played around a bit with firebug and it has something todo with the “odd” and “even” css class. If i rmeove them i get back the color.

    It’s a linux server.

    @focallocal

    Participant

    i’m making all changes live to my site as i havent launched yet (hopefully in 2 days) and my hosting companies servers are running Litespeed.

    <link rel=’stylesheet’ id=’bbp-default-css’ href=’http://focallocal.org/wp-content/plugins/bbpress/templates/default/css/bbpress.css?ver=2.5-5199&#8242; type=’text/css’ media=’screen’ />

    @focallocal

    Participant

    the odd thing is that every other page i’ve looked at appears absolutely fine, except for the home page.

    @focallocal

    Participant

    (including the forum itself)

    @thetechnoman

    Participant

    I have no clue what’s wrong, i just know that it works with the 2.4 version fine so it must be something wrong with the new version.

    @thetechnoman

    Participant

    Also if you read a topic you have the same problem. White text on a white background.

    @focallocal

    Participant

    i think i’ve found it.

    the problem is only there when W3 Total Cache and bbPress are both switched on, if either are off the problem goes away. i’ve flushed the cache a few times but it made no difference so i believe there is a compatibility issue between the two. W3 is not essential to my site so i’ve switched it off and wont worry too much, but i thought you’d like to know.

    @netweb

    Keymaster

    @focallocal Cool, it looks like the patch has worked for you

    The W3 (and any cache plugin for that matter) are known to be funky with bbPress, there are a few discussions here on bbpress.org if you want to know more on that.

    @netweb

    Keymaster

    @thetechnoman Are you using custom bbPress templates in your theme?

    It’s hard to tell by your screenshot of what is or is not broken, to me that looks fine but I have no idea what it used to look like, can you give me some more information and/or screenshots of 2.4 vs 2.5 please.

    @focallocal

    Participant

    just a last quick question.

    will the coming update overwrite the code i just changed without any issues?

    thanks very much

    @netweb

    Keymaster

    will the coming update overwrite the code i just changed without any issues?

    Yes, it will automaticlly overwrite the changes you made

    @jameset1024

    Participant

    Thanks for the reply’s I am going to try what @focallocal did with the new patch that was released to see if that fixes it. I had moved the stylesheet for bbpress into my theme for now and linked it that way so that I could continue working on it for now. I’ll try the fix the mentioned above tomorrow and see what that does for me. I appreciate all of the responses.

    @netweb

    Keymaster

    A probably quicker and easier way to test the patch is to download the following file:
    https://bbpress.trac.wordpress.org/export/5210/branches/2.5/includes/core/template-functions.php

    Save that to your PC and then with an FTP program upload it to your web host in this folder /public_html/wp-content/plugins/bbpress/includes/core

    @tkrivickas

    Participant

    @netweb tested 2.5 with patch – works fine now (on httpd). Thank you.

    @thetechnoman

    Participant

    No it should look like the website does. Black.

    If you visit a topic you have white text on white background. In the screenshot the text is only clue cause of the hyperlinks.

    You can’t see the amount of posts and threads in the screenshot cause they are also white.

    @jameset1024

    Participant

    That patched worked great I appreciate the help @netweb

Viewing 25 replies - 1 through 25 (of 26 total)
  • You must be logged in to reply to this topic.
Skip to toolbar