Opened 12 years ago
Last modified 10 years ago
#2302 new defect (bug)
Favorite/Subscribe AJAX doesn't work inside BP Group Forums
Reported by: | MZAWeb | Owned by: | MZAWeb |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | 2.1 |
Component: | General | Keywords: | needs-patch |
Cc: | wordpress@… |
Description
In #1905 we introduced the pure wp_ajax handlers in the theme. Seems that the correct scripts are not loading in BP group forums.
Reported here: http://bbpress.org/forums/topic/enqueue-ajax-script-in-buddypress-groups-forum/
Change History (10)
#2
@
12 years ago
User is reporting that he's not seeing the problem on the latest trunk. I'm still having the same issue with both bb's trunks.
Anyone can test and confirm?
#3
@
12 years ago
- Milestone changed from Awaiting Review to 2.4
This is a known issue for now, and will require a bit of a rethink to fix. The ajax lives inside of the theme/theme compat, because I don't want these things to be requirements in bbPress core. That said, we shouldn't duplicate any code, either.
Moving to 2.4 so we can discuss more.
#4
@
11 years ago
- Milestone changed from 2.4 to 2.5
Still an issue, but no movement in 2.4. Punting to 2.5.
#5
@
11 years ago
@johnjamesjacoby I was thinking of moving all the AJAX functionality to a new BBP_Default_AJAX class that can be instantiated both from bbp's themecompat and bp's themecompat without having to add it to bbp core. What do you think?
#6
@
11 years ago
- Milestone changed from 2.5 to 2.6
Let's iterate on how we want to handle ajaxifying bbPress going forward. There are other things to consider, like ajax reply posting, and whether or not we'd want to add that to theme compat, or add listeners into core.
Moving to 2.6.
@johnjamesjacoby this shouldn't be too hard to fix, but I'd love to discuss with you the approach.
I'd assume we don't want to use BP template tags in templates/default/bbpress-functions.php, where the ajax handlers + script loaders are defined (now it's only checking for bbp_is_single_topic()).
I'd also assume we don't want to replicate almost the same code in includes/extend/buddypress/group.php.
But BBP_Default is not a singleton, and the instance is not being saved anywhere (new BBP_Default();), so to be able to re-use the same code we'll need to refactor or extract it somewhere and hook from both classes, leaving the appropriate conditionals in each one.