Notifications
Clear all
Topic starter
15/02/2024 4:27 am
Hi, I found the problem causing errors with the WPDiscuz plugin when using the latest version of WP 6.4.3.
I disabled and activated all plugins one by one to figure this out. The problem is the PHP code I added to the code snippets plugin when customizing my theme a few years ago. Somehow now with this new WP 6.4.3 version, it’s causing problems. But it's a super simple line of code (see attachment). Most of that code is an echo statement that uses an action that Discuz still says exists.
Is there anything that Discuz can think of that may have changed that would make that code ineffective when I update the core?
When I update to WP 6.4.3, Discuz doesn't function properly. The problems I get with WP 6.4.3 are:
1. I can’t open and close the replies when clicking on the reply link. The stying also changes floating to the right. See screenshot.
2. I have also noticed before that I can’t seem to reply to comments.
3. And the "add photo” image under the reply text box is replaced and or disappears.
Everything works fine with the earlier version of WP 6.3.2.
Thank you and please let me know if you can think of a fix.
add_filter( 'wpdiscuz_mu_upload_icon', 'ah_comment_image_icon' ); /** * Replace Image upload icon with Camera icon * * @param $icon * * @return string * @since 1.0.1 * */ function ah_comment_image_icon( $icon ) { $icon = 'fas fa-camera'; return $icon; } //* Add text above comments for Wpdiscuz plugin add_action('wpdiscuz_comment_form_before', function() { echo '<span style="font-size:20px; text-transform: uppercase;padding-right: 5px;font-weight: 400;">' . __('Add a comment & photo -', 'wpdiscuz') . '</span>' . '<span style="font-size:17px; font-family: Poppins, sans-serif; letter-spacing: 1.2px;">' . __('Ask questions, share your feedback and photos!', 'wpdiscuz') . '</span>'; });
This topic was modified 9 months ago by adri
Topic starter
15/02/2024 4:42 am
Actually, I just found the problem was with another piece of code, not the one I posted in my original post!
Any idea why this is happening and how to fix it?
Here's what's causing problems with WP 6.4.3 - Lazy Load wpDiscuz v7 css/js (generic3)
add_action('wp', 'lazy_generic_wpd'); function lazy_generic_wpd() { if ( is_user_logged_in() ) {return;} $plugin = "wpdiscuz/class.WpdiscuzCore.php"; include_once(ABSPATH.'wp-admin/includes/plugin.php'); if ( ! function_exists('is_plugin_active') || ! is_plugin_active($plugin) ) {return;} if ( ! class_exists('mill_LazyLoad') ) { return; } //if ( isWPRocketNocacheURL() ) { return; } global $post; /* if ( ( ! empty($post) && is_a($post, 'WP_Post') && ! has_shortcode( $post->post_content, 'put_wpgm' ) ) || ! is_singular() ) { //if ( ( ! has_shortcode( $post->post_content, 'put_wpgm' ) ) ) { //if ( ! empty($post) && is_a($post, 'WP_Post') && (strpos($post->post_content,'cp_calculatedfieldsf') !== false) ) { if ( ( ! empty($post) && is_a($post, 'WP_Post') && ! has_shortcode( $post->post_content, 'ctct' ) ) ) { //remove_action( 'wp_enqueue_scripts', 'wp_review_enqueue', 12 ); //global $CPCFF_FORM; //global $CPCFF_MAIN; //remove_action( 'init', array( $CPCFF_FORM::instance(), 'init' ), 1 ); //remove_action( 'init', array( $CPCFF_MAIN::instance(), 'init' ), 1 ); add_action('wp_enqueue_scripts', function(){ wp_deregister_style('ctct_form_styles'); wp_deregister_script('recaptcha-v2'); wp_deregister_script('ctct_frontend_forms'); }, 99999999); //add_action('wp_footer','start_buff_sdm', 0); //add_action('wp_footer','end_buff_sdm', 99998); */ //} else { // 2020-11-06 add_action('wp_footer', function(){ echo "<style>#wpd-bubble-wrapper #wpd-bubble-all-comments-count{color:#1DB99A}#wpd-bubble-wrapper>div{background-color:#1DB99A}</style>"; }, 999); new mill_LazyLoad (array( "plugin" => $plugin, "prefix" => "wpd", "scrollthreshold" => "444", "trigger" => array( "trigger" => 'inview', // 'inview', 'click', null "loadthreshold" => "2223", "selector" => '#wpdcom,#wpcomm', // eg '.container' ), "cssJsArray" => array( //'\/fancybox\/' '\/wpdiscuz\/themes\/default\/style\.css', '\/wpdiscuz\/assets\/third-party\/font-awesome-5\.(.*)\/css\/fa\.min\.css', '\/wpdiscuz\/assets\/css\/wpdiscuz-combo' ), "extraJsArray" => [ "/wp-content/plugins/wpdiscuz/assets/js/wpdiscuz-combo-no_quill.min.js", ], // footer css "cssArray" => array( //'\/plugins\/super-socializer\/js\/' ), "rootMargin" => '1050', //"fetchJSfilesAsync" => true, "fetchJSfilesAsync" => false, )); // } }
15/02/2024 1:14 pm
Please note that all questions regarding wpDiscuz plugins should be directed to the wpDiscuz.com forum. Here, we exclusively provide support for paid addons.