Search Results for 'code'
-
Search Results
-
Pulling my hair out on this one – Forums and Topics work just fine in the admin and in the front-end. However, Replies totally crash the site – on the front-end, they just fail quietly, but Add New on the Replies page in admin causes WordPress to fail. Trying to track down what could possibly cause this, because it feels really strange!
Copying over the first 100 lines or so of the stack trace to see if ANYONE has any idea what could be causing this.
Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '1024' frames at /www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-object-cache.php:141 at WP_Object_Cache->is_valid_key() (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-object-cache.php:364) at WP_Object_Cache->get() (/www/kinsta/public/internationalmidwivesorg/wp-includes/cache.php:154) at wp_cache_get() (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-post.php:240) at WP_Post::get_instance() (/www/kinsta/public/internationalmidwivesorg/wp-includes/post.php:1036) at get_post() (/www/kinsta/public/internationalmidwivesorg/wp-includes/post.php:1495) at get_post_type() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/common/template.php:454) at bbp_is_reply() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:544) at bbp_get_reply_title_fallback() (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324) at WP_Hook->apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205) at apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174) at get_the_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603) at bbp_get_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405) at bbp_get_reply_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549) at bbp_get_reply_title_fallback() (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324) at WP_Hook->apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205) at apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174) at get_the_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603) at bbp_get_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405) at bbp_get_reply_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549) at bbp_get_reply_title_fallback() (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324) at WP_Hook->apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205) at apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174) at get_the_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603) at bbp_get_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405) at bbp_get_reply_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549) at bbp_get_reply_title_fallback() (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324) at WP_Hook->apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205) at apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174) at get_the_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603) at bbp_get_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405) at bbp_get_reply_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549) at bbp_get_reply_title_fallback() (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324) at WP_Hook->apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205) at apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174) at get_the_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603) at bbp_get_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405) at bbp_get_reply_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549) at bbp_get_reply_title_fallback() (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324) at WP_Hook->apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205) at apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174) at get_the_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603) at bbp_get_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405) at bbp_get_reply_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:549) at bbp_get_reply_title_fallback() (/www/kinsta/public/internationalmidwivesorg/wp-includes/class-wp-hook.php:324) at WP_Hook->apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/plugin.php:205) at apply_filters() (/www/kinsta/public/internationalmidwivesorg/wp-includes/post-template.php:174) at get_the_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/topics/template.php:603) at bbp_get_topic_title() (/www/kinsta/public/internationalmidwivesorg/wp-content/plugins/bbpress/includes/replies/template.php:1405)
Hello,
While trying to access users from admin menu, I am getting a fatal error and when enabling the debug mode, I am getting this error message:
Fatal error: Uncaught Error: Call to undefined function bp_core_get_user_domain() in /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/extend/buddypress/members.php:229 Stack trace: #0 /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/extend/buddypress/members.php(100): BBP_BuddyPress_Members->get_profile_url(2) #1 /home/islandbnb/public_html/wp-includes/class-wp-hook.php(324): BBP_BuddyPress_Members->get_user_profile_url(2) #2 /home/islandbnb/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(2, Array) #3 /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/core/abstraction.php(471): apply_filters('bbp_pre_get_use...', 2) #4 /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/users/template.php(560): bbp_maybe_intercept('bbp_pre_get_use...', Array) #5 /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/admin/users.php(260): bbp_get_user_profile_url(2) #6 /home/islandbnb/public_html/wp-includes/class-wp-hook.php(324): BBP_Users_Admin->user_row_actions(Array, Object(WP_User)) #7 /home/islandbnb/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #8 /home/islandbnb/public_html/wp-admin/includes/class-wp-users-list-table.php(520): apply_filters('user_row_action...', Array, Object(WP_User)) #9 /home/islandbnb/public_html/wp-admin/includes/class-wp-users-list-table.php(415): WP_Users_List_Table->single_row(Object(WP_User), '', '', 0) #10 /home/islandbnb/public_html/wp-admin/includes/class-wp-list-table.php(1709): WP_Users_List_Table->display_rows() #11 /home/islandbnb/public_html/wp-admin/includes/class-wp-list-table.php(1636): WP_List_Table->display_rows_or_placeholder() #12 /home/islandbnb/public_html/wp-admin/users.php(814): WP_List_Table->display() #13 {main} thrown in /home/islandbnb/public_html/wp-content/plugins/bbpress/includes/extend/buddypress/members.php on line 229
Topic: Shortcode
I am using the shortcode [bbp-forum-index] but it is not showing any topics, just the image I added to the Members Forum.
Appreciate any help.
I installed the plugin, I put the differinte shortcodes in my site and when i access the page I can see the the topic/fourms i made from the dashboard but when i click them its a blank screen
please help!
We are implementing bbPress to add private forums to LearnDash courses. We are using the LearnDash bbPress Integration plugin.
When a logged in user views the /forums page or the /topics page they see all forums and topics. (We are using Visibility: Private for forums) even though the user does not have access to the forums or topics due to the LearnDash Integration plugin. I asked LearnDash if they know a way to hide the ones that the user does not have access to. They said that they did not know, and that I should contact bbPress support.
Is there a way that I can programmatically add a per user filter for the following shortcodes: [bbp-forum-index], [bbp-topic-index]? I would like to inject logic that would exclude records based on the currently logged in user.
Any ideas would be appreciated! I may need to write my one shortcode but did not want to reinvent the wheel if I do not need to!
Thank you!
JosephHello.
I would like a forum index that is separate from the archives page, but haven’t been able to get that working.
I’ve changed the slug in the settings, created a page with that slug, but it redirects to the posts archives every time.
If I include the shortcode on the archives page it works fine, but then it’s available to the general public, and I’d like it to be on its own, and available to members only.
Any help would be appreciated.
WP and BBP are latest versions. Archives page is here: https://simcoecountygreenbelt.ca/our-work/ and the Forum Index is supposed to be here: https://simcoecountygreenbelt.ca/community/
Topic: Caption code
Hi,
I have installed BBPress for my forum, some photos of my forum have these code:
[caption id="attachment_1496" align="alignnone" width="300"] [/caption]
Please tell me how to remove it,
Thank you very much!WordPress Version: 6.4.2
bbPress Version: 2.6.9
Link to site: Unavailable (Site created using LocalWP and still hosted locally)When I create topics through the standard frontend or backend, the new topic shows up in the forum perfectly.
However, if I create a new topic using a plugin extension I’ve cobbled together, the new topic does not show up on the front end of the website (despite it being created and visible on the back end).
The plugin written in php is as follows (thanks to work from here and here):
<?php /** * Plugin Name: bbPress API * Description: Exposing the bbPress post types to WP API. * Author: Rillien Cot * Version: 1.3.0 */ /** * Add REST API support to an already registered post type. */ add_action('init', 'register_bbp_post_types', 25); function register_bbp_post_types() { global $wp_post_types; $post_type_name = bbp_get_reply_post_type(); if (isset($wp_post_types[$post_type_name])) { $wp_post_types[$post_type_name]->show_in_rest = true; $wp_post_types[$post_type_name]->rest_base = $post_type_name; $wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller'; } $post_type_name = bbp_get_topic_post_type(); if (isset($wp_post_types[$post_type_name])) { $wp_post_types[$post_type_name]->show_in_rest = true; $wp_post_types[$post_type_name]->rest_base = $post_type_name; $wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller'; } $post_type_name = bbp_get_forum_post_type(); if (isset($wp_post_types[$post_type_name])) { $wp_post_types[$post_type_name]->show_in_rest = true; $wp_post_types[$post_type_name]->rest_base = $post_type_name; $wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller'; } // Add custom REST API endpoint for creating bbPress topic add_action('rest_api_init', 'create_bill_endpoint'); } function create_bill_endpoint() { register_rest_route('pnyx/v2', '/bill/', array( 'methods' => 'POST', 'callback' => 'create_bill', )); } function create_bill($data) { // Extract necessary data from the request $forum_id = $data['forum_id']; $topic_title = $data['topic_title']; $topic_content = $data['topic_content']; $bill_id = $data['bill_id']; // Create a new bbPress topic $topic_args = array( 'post_title' => $topic_title, 'post_content' => $topic_content, 'post_type' => bbp_get_topic_post_type(), 'post_status' => 'publish', 'post_parent' => $forum_id, // Set the post_parent to the forum ID ); $topic_id = wp_insert_post($topic_args); ?>
Basically, it exposes the Forum, Topic, and Reply post types from bbPress to standard wp-json/v2 namespace and then adds an additional endpoint (‘create_bill’) which allows me to add a new topic and associate it with a forum via ‘post_parent’. (I wonder if this is where the problem is?)
I create a new topic using the following python script:
import requests import json # Set WordPress API authentication details username = "*******" password = "**********************" auth = requests.auth.HTTPBasicAuth(username, password) # Values for new post data new_post_data = { "forum_id": 40, # <- This is a valid post id of a forum. "topic_title": "New API Topic Title", "topic_content": "Lorem ipsum content for the new topic" } # Make the POST request to create a new post wordpress_api_url = "http://pnyx.local/wp-json/pnyx/v2/bill/" response = requests.post( wordpress_api_url, auth=auth, headers={ 'Content-Type': 'application/json', }, data=json.dumps(new_post_data) )
The topic is created, and I can see it in Dashboard>>Topics>>All Topics. And I can view it by going directly to the link associated with it, but I can’t see it on the actual frontend of the forum.
I’ve deactived all other plugins and I’m still getting this issue. The only differences between the two (as far as I can tell) are the Author IP (API created topics leave this field blank, standard fills it with 127.0.0.1) and the number of voices (API created topics have 0, standard created topics have 1). All the other settings seem identical (visibilty = public, type = normal, status = open).
Any insights as to what I’m missing and how to rectify the situation are greatly appreciated, thanks!