Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress CSS Validation Error Reporting


  • Archie Webmaker
    Participant

    @weblogian

    Have you notice (or I am the only one):

    If I hide admin bar for logged out users
    I receive this error message:
    document type does not allow element “style” here

    If I don’t hide admin bar for logged out users

    I passed the w3 validator

Viewing 2 replies - 1 through 2 (of 2 total)
  • No you’re not the only one I raised a ticket on the matter.

    Problem is that for the moment you shouldn’t use that hide adminbar unless you make some changes. The issue is that there is a function that checks to see if disable adminbar is true and if so it generates a style tag with a ruleset to hide the adminbar with display:none, this function then adds an action with places this style tag erroneously in the wp_footer hook resulting in a style tag sitting in the document body, a major validation issue as it’s obviously illegal to place this tag at this point in a document.

    As in reality this style tag is not actually required due to the adminbar being removed anyway the function ought to have been removed, but for some unknown reason it was deemed to be ok to leave until bp 1.3 branch is released.

    To fix in the meanwhile as there may be a wait for 1.3 you will have to add a remove_action or edit the core file holding the function (not first choice)

    In a child functions.php file you can try adding this line:

    remove_action(‘wp_footer’, ‘bp_core_override_adminbar_css’);

    That should prevent the action from running, tested and works for me on WP 3.0 BP 1.2..4.1, but there may possibly be better approaches?


    Archie Webmaker
    Participant

    @weblogian

    @hnla
    Thank you so much for the response

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Buddypress CSS Validation Error Reporting’ is closed to new replies.
Skip to toolbar