Skip to:

Profile Fields on Admin – No js link

  • danf-1


    I just downloaded bp and got it working pretty easily into site. Very excited to start using it with new site being launched in a few months.

    In looking at the profile fields in admin – the child info for the fields are not working properly (i.e. I don’t see anything happen when I select one of the dropdown/checkbox/radio etc fields and get an error when saving that I need to select options).

    In digging deeper, I see that the html is being generated properly and the code is there with style=”display: none” so that they are hidden until selected, but I don’t see a reference to the bp-xprofile/js/admin.js script anywhere in the html output. Thus, its not executing the appropriate javascript to show the appropriate info.

    I also looked at the bp-xprofile-cssjs.php file and don’t see any addition of the js/admin.js script being added.

    Am I missing something? I assume this would be working for others, but I don’t see how it could be working for others based on my analysis of the code.

    Im using trunk-r571.

    Any insight into why this is not showing up? Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

  • revolutionfrance


    I am having exactly the same problem…any ideas anyone?



    I confirmed via javascript debugger that indeed the javascript ‘show_options’ function is not defined. This function is in the bp-xprofile/js/admin.js file used to create the drop down options for new fields.

    So I had to add the following to the bp-xprofile/bp-xprofile-cssjs.php file in order for it to work. This may not be where it is suppose to go, but it works for me. I assuming this worked at some point, but somehow got removed???? Hopefully this gets added back in for next trunk. Its not in r577.

    function xprofile_add_admin_js() {

    if ( strpos( $_GET, ‘xprofile’ ) !== false ) {

    echo ‘<script type=”text/javascript” src=”‘ . site_url() . ‘/wp-content/mu-plugins/bp-xprofile/js/admin.js”></script>’;



    add_action( ‘admin_head’, ‘xprofile_add_admin_js’ );

    This was likely removed by mistake, I will add it back now. I was changing things with JS and CSS inclusion according to WP coding standards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Profile Fields on Admin – No js link’ is closed to new replies.
Skip to toolbar