Profile buttons not working (fixed)
-
Hi, currently running on latest wordpress and buddypress versions.
My problem is that private message, public message and add friend buttons appear but are not clickable. I tried with Twenty Sixteen and the problem is still there.
Any ideas ?
Thanks a lot
-
Hello @louisarthur – When you say that they’re “not clickable”, what do you mean? Are they
disabled
– greyed out, and impossible to select? Or does it simply not do anything when you click them?You may have some JavaScript – perhaps in your theme – that is preventing the link clicks from working properly. Try disabling JS in your browser to see if it solves the problem. If so, the next step will be to find the problematic JS.
Another thing you may try is opening your browser’s developer console to see if you notice any errors that might be relevant to the issue. In most browsers, you do this by hitting the F12 key.
Hi @boonebgorges thanks for your answer. They are indeed impossible to select. If you hover over them no hands appear and it is still a regular mouse pointer.
Here is a screenshot of my JavaScript Console.
I tried loading with mixed content allowed but it doesn’t change a thing.When you say “impossible to select”, exactly what does it mean? When you hover over the buttons, does your cursor change (to a hand, for example), or do you see a color change? If not, this could be a CSS issue that’s causing them to appear behind some other element, and thus making them unclickable.
From the screenshot you’ve shared, I don’t see any indication that these buttons are failing for a reason related to a JS error. The Mixed Content warning shouldn’t affect it.
The thing about these buttons is that they are not supposed to be JS-powered. They’re regular links. So if it’s impossible to click them, it’s likely that they’re being somehow obscured in the markup.
No cursor change. So if I click it’s just like if I clicked anywhere else on the page. However when I hover there is indeed a color change.
I thought it could be theme related but the same problem happens with Twenty-Seventeen. Could it be a problem in the generate button link function ?> Could it be a problem in the generate button link function ?
It’s possible, but it’s definitely not a problem with BP in the most general sense. I’m looking right now at an installation that is running Twenty Seventeen, and the buttons in question are clickable. It *could* be that you have another plugin that is somehow modifying the markup so as to make the buttons unclickable. Here’s what the markup for these buttons should look like (this specific example is the ‘Public Message’ button, but they are all similar):
<a href="http://example.com/activity/?r=username&_wpnonce=97df4e3389" class="activity-button mention">Public Message</a>
Does yours look similar to this? If not, then there must be a plugin or some JS interfering.
If possible, you could send me login credentials (my buddypress.org username @ gmail.com) so that I could see from a logged-in user’s point of view.
@louisarthur – Thanks for sending me credentials. I’ve logged into your site to have a look.
As you note in your email, there’s no
href
attribute on these links. It’s not clear to me how this would be the case, but I can give you a starting point for looking into it yourself. Briefly, the buttons will be built without anhref
if the button constructing function passes an emptylink_href
parameter to theBP_Button
class. The functions used in the two cases are different:Message public: https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-activity/bp-activity-template.php?marks=3090#L3079
Message privé: https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-messages/bp-messages-template.php?marks=1362#L1360
The logic in each case is different, but since neither is showing up, I’m guessing that one of two things is happening:
1. One of the conditional checks shared between them is failing for some reason:
bp_is_my_profile()
,is_user_logged_in()
.2. Something on your installation – perhaps your theme but probably a plugin (since you said Twenty Seventeen was exhibiting the problem as well) – is filtering both ‘bp_get_send_private_message_link’ and ‘bp_get_send_public_message_link’, and then incorrect returning empty strings.
To test idea #2, you might try – if you can – searching through your codebase for those filter names.
Thank you very much @boonebgorges !
Finally found the faulty plugin: Paid Memberships Pro – BuddyPress Add On
Just have to check that my Buddypress is still correctly locked down without it !Excellent! Good luck as you continue to work on your site.
Hi friend, this is my website http://www.99wordpressdevelopers.com and help me for adding more than one social media buttons in footer. If you have any ideas then suggest me?
Also i want to know how to install WordPress blog through Cpanel.
- The topic ‘Profile buttons not working (fixed)’ is closed to new replies.