Hi @johnnyjonjon
I tried submitting the form via a) Chrome and b) IE
a) This worked.
b) This seemed to fail? The console errors I get are:
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
File: bbpress-register
HTML1300: Navigation occurred.
File: bbpress-register
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
File: bbpress-register
I’m not entirely sure what this means, but perhaps someone else here will know?
thanks for the feedback. I wondered about a couple things. I guess with HTML5, it’s no longer recommended the form action be blank (the buddypress form contains action=””) due to unpredictable browser behavior. I tested this by editing html in the browser and submitting but didn’t seem to make a difference:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=14215#c1
Another buddypress bug I found here that seems to be the issue I’m experiencing.. but it was patched in 2.0.1 and I’m running 2.0.2.. Could this be related in some way? I’m having problems figuring this out..
https://buddypress.trac.wordpress.org/ticket/5595
If the theme vendors have chosen not to support BuddyPress (it really doesn’t take much effort — and you have to be doing something non-standard for BP’s default compatibility to not work), that’s disappointing to hear and I guess it means I won’t be recommending ab-themes. If the developers at ab-themes read this and you do want to get things working with BuddyPress, email me at paul at this domain, and we’ll see what we can do to help.
If it works in IE/Safari with twentyfourteen but not with your normal theme, the problem must be in your normal theme templates somewhere. I don’t think the “The code on this page disabled back and forward caching” error is relevant as that is in IE only (I assume), and you’ve said that it also doesn’t work in Safari.
I wonder if @mercime has seen anything like this before.
Thanks for the feedback guys- I tracked the issue down to a piece of jquery in the theme’s custom.js file line 289 – 292:
$(".submit").click(function () {
$(this).closest("form").submit();
});
Commenting this out fixes the issue. Not sure why this global takeover for the submit is in the theme, but it just happened the buddypress form also has a div with the same class. Not sure how disabling affects the other forms and such for the theme itself, but at least BP registration works again!
Thanks, Jon
@johnnyjonjon Glad you resolved the issue. Thanks for posting back with your solution. I’d suggest you mention that to the theme authors. Marking this topic as resolved.
@djpaul Strange, just got notification re mention a few minutes ago. Never seen the issue before and fortunately johnnyjonjon found the js conflict.
@johnnyjonjon
That’s a somewhat odd snippet of JS the theme has written, very generic in nature and definitely not normally something required unless under specific circumstances then one would expect to see a more specific and unique naming for the elements to avoid any notion of globalising a form submit to control via js.
I think the issue here is that a very common and generic class token is targeted ‘.submit’, often seen on form controls of type ‘submit’ however BP uses this class on a wrapping element ‘div’ so what is happening more likely than not is that this element is receiving this behaviour and triggering an action before the actual form control and thus not actually passing the form action to BP; certainly adding an event to a parent is going to and does trigger if you move focus slightly of the actual form submit control.
As I don’t think BP uses the class .submit for anything specific (might be wrong but it’s not required to submit the form ) you could think about changing it e.g submit-this’ and re-instate the themes JS even though it’s a snippet of code that ought not to exist in the manner it does but removing may affect other theme functionality
Right, that JS in the theme is too general and is affecting forms inside BuddyPress templates.