I cannot comment
-
Hello
Something very curious happens to me. My users when they want to add a comment and click on the “comment” icon, instead of being able to comment, the page scrolls to the top.
Why does this happen?
Thank you very much.
-
Hello @iacobustime,
Thanks for using our plugin.
Based on our experience this usually happens because our buddypress.min.js file is being overridden or not called on the page.
Here’s The code snippet below, please add it to the file “bp-custom.php” in the path “wp-content/plugins” :
<?php function yz_fix_wpengine_scripts_fix () { if ( bp_is_group() || is_page( 'activity' ) || bp_is_activity_directory() ) { wp_enqueue_script( 'buddypress_query',BP_PLUGIN_URL . 'bp-core/js/jquery-query.min.js',array( 'jquery' ) ); wp_enqueue_script( 'buddypress_cookie',BP_PLUGIN_URL . 'bp-core/js/vendor/jquery-cookie.min.js',array( 'jquery' ) ); wp_enqueue_script( 'buddypress_js', YOUZIFY_ASSETS . 'js/buddypress.min.js',array( 'jquery' )); wp_enqueue_script( 'buddypress_scrollto',BP_PLUGIN_URL . 'bp-core/js/vendor/jquery-scroll-to.min.js',array( 'jquery' ) ); $params = apply_filters( 'bp_core_get_js_strings', array( // Strings for display. 'accepted' => __( 'Accepted', 'buddypress' ), 'close' => __( 'Close', 'buddypress' ), 'comments' => __( 'comments', 'buddypress' ), 'leave_group_confirm' => __( 'Are you sure you want to leave this group?', 'buddypress' ), 'mark_as_fav' => __( 'Favorite', 'buddypress' ), 'my_favs' => __( 'My Favorites', 'buddypress' ), 'rejected' => __( 'Rejected', 'buddypress' ), 'remove_fav' => __( 'Remove Favorite', 'buddypress' ), 'show_all' => __( 'Show all', 'buddypress' ), 'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ), 'show_x_comments' => __( 'Show all comments (%d)', 'buddypress' ), 'unsaved_changes' => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ), 'view' => __( 'View', 'buddypress' ), // Settings. 'store_filter_settings' => apply_filters( 'bp_legacy_store_filter_settings', is_user_logged_in() ), ) ); wp_localize_script( 'buddypress_js', 'BP_DTheme', $params ); } } add_action( 'wp_enqueue_scripts', 'yz_fix_wpengine_scripts_fix' );
Ps: if you didn’t find the file “bp-custom.php”, just create a new one.
Let me know if this worked fine for you 🙂
Best Regards, KaineLabs Team.
Hello, it did not work.
The “bp-custom.php” file did not exist and I had to create it. I have added the code you indicate, but it still does not work.Which theme and hosting you are using?
Also please send me a screenshot of where you added the bp-custom.php file and a screenshot for the file content.
Theme: Illdy Versión: 2.1.9
Hosting: Dinahosting.I don’t know how to add images here, sorry
You can upload it on https://pasteboard.co/ and share the links with us 🙂
Thanks @iacobustime for the screenshots, actually you added the code right.
It will be hard to locate the problem as we need to debug the site, but I will try to download the theme and test it. Hope I can replicate the problem to solve it so I can share the solution with you.
I will get back to you as soon as possible 🙂
Hi @iacobustime,
I installed the theme and I was able to comment successfully so I think the conflict is coming from something else
Also, I found that theme has some Javascript errors that need to be fixed as they might be a potential problem that prevents some javascript code from being called on the page.
Can you please consider investing in a pro version and so our team can access your site to debug the issue and locate the source of the problem so we can resolve it?
Waiting for your reply.
Best Regards, KaineLabs.
- The topic ‘I cannot comment’ is closed to new replies.