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?
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.
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
hrefattribute 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 an
hrefif the button constructing function passes an empty
link_hrefparameter to the
BP_Buttonclass. The functions used in the two cases are different:
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:
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.
- The topic ‘Profile buttons not working (fixed)’ is closed to new replies.