Skip to:
Content
Pages
Categories
Search
Top
Bottom

Ajax calls *seem* to cause disappearance of join/leave buttons, other buttons too,

  • @kpolkson

    Participant

    I’ve noticed that there has been a pretty consistent issue with, for instance, the join/leave group buttons on the main groups directory disappearing after an ajax call is made (like using the drop down ‘Order by: ‘ filter). They come back with a full refresh of the page. This occurs else where, though this is the most prominent instance and all instances seem to be related to ajax calls.

    I don’t see any errors in the console and there are no relevant errors on the server side. I have buddypress 1.6.1 and am using the buddypress template pack to make it compatible with a custom theme.

    Was just wondering if anyone else has had trouble with this or if there are any tips on where I might look first to investigate this unwanted behavior.

    Thanks in advance. – kp

Viewing 10 replies - 1 through 10 (of 10 total)
  • @karmatosed

    Moderator

    Usually if this happens it would be due to a scripting clash or error. I would myself when diagnosing this compare to the default BuddyPress theme just to see if it happens there. Have you tried that?

    @kpolkson

    Participant

    Just tried that. It is happening in the default theme, too.

    I thought it might have been a script issue because I was queuing up the ajax and global.js files in my functions.php so that I could then queue up a custom js file after that (since just enqueuing the custom.js file alone made it load before jquery etc.)

    `require_once( BP_PLUGIN_DIR . ‘/bp-themes/bp-default/_inc/ajax.php’ );
    wp_enqueue_script(
    ‘bp-js’, BP_PLUGIN_URL . ‘/bp-themes/bp-default/_inc/global.js’,
    array( ‘jquery’ )
    );

    /* enqueuing our custom js script */
    wp_enqueue_script(‘custom’, get_template_directory_uri().’/js/custom.js’);`

    Though it happening in the default theme is confusing as I don’t think that would be an issue there.

    @kpolkson

    Participant

    is there anyone else that might have some experience with this, I hope I am not the only one. Can’t figure out where to start debugging.

    @jaybird2214

    Participant

    So I’ve been having some troubles with a few buttons not showing up or working properly, one of them being the “Post Update” button on the Groups activity page. I figured out that the reason why some of these buttons were not showing up or working properly was from my AJAX.

    Without reading too much about AJAX in WordPress, I added in header.php:

    in order to get AJAX to work. This aparently was calling all of my AJAX scripts when they weren’t supposed to be called, therefore interfering with other AJAX calls.

    After removing that from header.php, all of the buttons my site began working normally.

    @kpolkson

    Participant

    thanks for the helpful advice jaybird2214 🙂

    @earthman100

    Participant

    Jaybird – I am having this trouble too – can you please repost the code you mentioned above, as it looks like it was stripped out of your post here – thanks!

    @earthman100

    Participant

    @kpolkson – did you find a solution? 

    If so, would you please share what solved it for you?

    @earthman100

    Participant

    After some more research, it appears this is a known bug that is listed as “WON’T FIX” :

    https://buddypress.trac.wordpress.org/ticket/4525

    Not too clear about what they mean in the last comment by: “Closing as wontfix, as theme compat will enable us to fix this easier if it comes up again.”

    but it would seem that the core team have no interest in fixing this.  Has anyone else found any solutions to offer them?

    @hnla

    Participant

    Don’t take it personally, ‘wontfix’ essentially means it’s an edge case scenario  not necessarily a problem, and just sometimes users have to deal with issues themselves.

    Are you actually sure that ticket does accurately describe your problem? if so then DJPaul provides a suggested patch/workaround  on the ticket. I would re-read the ticket carefully and ensure what it describes is the issue you are having then if it is try the patch and/or removal of the is_admin() check as all the suggested fixes are in functions that are overloadable or plugable then you should be able to test quite easily in a BP activated theme.

    @moonpie00

    Participant

    Oh dear, what was the fix/code for this! I desperately need it.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Ajax calls *seem* to cause disappearance of join/leave buttons, other buttons too,’ is closed to new replies.
Skip to toolbar