Skip to:
Content
Pages
Categories
Search
Top
Bottom

JavaScript Broken – Integration Issue


  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    In my WordPress functions.php file, I am queuing up jQuery for some interface objects I’m using.

    wp_enqueue_script('jquery');

    It seems this messes with bbPress’s javascript inclusion, causing none of the JS from bbPress ever to get loaded.

    Because I am using jQuery also in bbPress, is there a way around this that anyone can think of?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Can’t you do a check before the function to see if it’s a WP or BB page? Then just don’t call it on the BB pages.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Good call. That alleviates one problem.

    On to the next… Now all of the JavaScript loads properly and when clicking the “add to favorites” link, the ajax kicks in and works as per normal and makes it look like the link was added. The link actually shows in the database as a favorite, but the theme fails to load them correctly.

    I’ve tested this on the stock template also with the same results.

    Removing the WordPress integration from the bb-config.php file brings everything back and they work just fine. Comparing with WinMerge the source of the same page with and without that integration, they are identical. So somewhere something is getting in the way.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Looks like a few changes might be needed unless I’m missing something along the way…

    This makes the favorites load properly for me.

    includes/functions.bb-users.php

    line 221

    FROM

    if ( !empty($user->favorites) ) {

    TO

    if ( !empty($user->bb_favorites) ) {

    includes/class.bb-query

    line 442

    FROM

    $where .= $this->parse_value( 't.topic_id', $f_user->favorites );

    TO

    $where .= $this->parse_value( 't.topic_id', $f_user->bb_favorites );

    line 559

    FROM

    $where .= $this->parse_value( 'p.topic_id', $f_user->favorites );

    TO

    $where .= $this->parse_value( 'p.topic_id', $f_user->bb_favorites );

    Basically, there are a few other places where $user->favorites needs to be changed to $user->bb_favorites.

    So, I’ve got it up and working from doing the above. I’ve never needed to commit a change to the trac before. Should I just open a ticket, or can I change it directly?


    chrishajer
    Participant

    @chrishajer

    You should add a ticket at trac and then attach your patch. I don’t believe too many people have commit permission on the repository (i.e. mdawaffe and sambauers only, I think.) They will review the ticket and the patch and apply it if appropriate.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I get the feeling that this has more to do with slugs and attempted auto renaming and assignments than it does with hardcoding the value into each file, but hardcoding it works for now and brings the capability back.

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