BuddyDev

Search

[Resolved] Conditional Profile Fields Plugin : xpfields is not defined Error

  • Participant
    Level: Initiated
    Posts: 9
    mattheoh on #2625

    Hi there !
    I installed your plugin, but it doesn’t seem to work… I m on WP 4.4.2 and buddypress 2.3.5.
    When I look at the console, I have the following error :

    ReferenceError: xpfields is not defined
    var all_fields = xpfields.fields;

    Which corresponds to line 6 of the bp-conditional-field.js file
    After your advice in the page plugin comments, I also update the plugin in 1.1.5 version (deleting the previous one before) – but same result… :-/
    Would you have an idea ?

  • Keymaster
    (BuddyDev Team)
    Posts: 21463
    Brajesh Singh on #2626

    Hi Matt,
    Thank you for posting here. Please let me check it and I will get back to you within an hour. Need to test in 2.3.5 as it a little bit old now.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 9
    mattheoh on #2627

    Hi,
    don’t bother to test with BP 2.3.5. I also updated it to 2.4.3.
    Same error.
    maybe I have a JS conflict or something in my theme which creates the error.
    You can see it here : http://www.mafamillezen.com/inscription/
    Thanks again !

  • Keymaster
    (BuddyDev Team)
    Posts: 21463
    Brajesh Singh on #2633

    Hi Matt,
    Thank you. I looked at it. There are two possibilities and I will need your help to understand and fix it.

    1. Is that page set as registration page in BuddyPress Pages settings? The javascript is only loaded on registration page.

    2. Or bp_head is not being called. In that case, I can just switch the binding to wp_head.

    Please let me know if the fist case is incorrect.

  • Participant
    Level: Initiated
    Posts: 9
    mattheoh on #2634

    Hi, Thanks for having a look ! I appreciate that.
    I confirm you that this registration page is well set in BP settings… :-/

  • Keymaster
    (BuddyDev Team)
    Posts: 21463
    Brajesh Singh on #2635

    Thank you for confirming.
    I have updated the plugin to use wp_head instead. Can you please give 1.1.6 a try. It is available here now

    https://buddydev.com/plugins/conditional-profile-fields-for-buddypress/

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 9
    mattheoh on #2636

    Awesome ! It works perfectly now.
    Thanks a lot for your correction and your help.
    Have a good week-end buddy 😉

  • Keymaster
    (BuddyDev Team)
    Posts: 21463
    Brajesh Singh on #2637

    Thank you Matt.
    I appreciate your patience in helping me fix the issue with this plugin as well as the search bug on BuddyDev.

    Thank you. Have a great weekend to you too 🙂

    Brajesh

  • Participant
    Level: Initiated
    Posts: 9
    mattheoh on #2638

    You ‘re very welcome !
    Last question , maybe it s a bit off topic (so let me know if you want me to open a new one)
    Is there a way not to have this empty value in a field with select list (see picture)
    Because when the page loads for first time, even if I configured a default value at 0, the field loads with the hashes —- , and puts the mess in my conditional fields which should be hiden !

    http://i.imgur.com/pWKGQqS.png

    Any idea ?

  • Keymaster
    (BuddyDev Team)
    Posts: 21463
    Brajesh Singh on #2639

    Hi Matt,
    Thank you. I just tested and I see the problem on registration page. It is due to how we handle values. Please give me 5 minutes and It will be fixed.

    About the selection of default value in dropdown:- Please make sure you have setup the default value correctly in the edit field page. I can see the default value selected when I set but it is not working with conditional profile field plugin.

You must be logged in to reply to this topic.

This topic is: resolved