• Resolved kit426

    (@kit426)


    I have a some buddy press extra field that I want to display using your short code for the user that is viewing the page, however I can’t seem to get it to work without hard coding a user id. I’ve tried:

    Don’t work
    [bpps_profile_field field=”Company Support Id” tab=”Post Registration Fields” user_id=0]
    [bpps_profile_field field=”Company Support Id” tab=”Post Registration Fields” user_id=”]
    [bpps_profile_field field=”Company Support Id” tab=”Post Registration Fields” user_id=””]
    [bpps_profile_field field=”Company Support Id” tab=”Post Registration Fields”]

    Only One that Works.
    [bpps_profile_field field=”Company Support Id” tab=”Post Registration Fields” user_id=”3″]

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 33 total)
  • Plugin Author Venutius

    (@venutius)

    Hi there, could you try the following:

    [bpps_profile_field field=”Company Support Id” tab=”Post Registration Fields”]

    That should work for the user who is viewing the page, I think with the other options you were trying you were setting the user_id to be a non valid option.

    TreeTrail

    (@aprilschmitt27)

    Hello Venutius,

    RE Error: “The tab name is invalid”

    Thank you very much! I am trying to utilize your super smart plugin. As you can see below, fields like [bpps_profile_displayname] work perfectly. However, when trying to return a field from the xProfile data …it’s failing.

    SHORTCODES:
    Name: [bpps_profile_displayname]
    Phone Primary by ID: [bpps_profile_field field=”2” tab=”1”]
    Phone Primary by NAME: [bpps_profile_field field=”Phone Primary” tab=”INDIVIDUAL”]

    RESULTS:
    Name: April Schmitt
    Phone Primary by ID: The tab name is invalid
    Phone Primary by NAME: The tab name is invalid

    SYSTEM:
    WP Version: 4.9.8
    PHP Version: 7.0.32
    MySQL Version: 5.6.40
    Kleo (Child) Theme: 4.3.12
    BuddyPress 3.2.0
    BuddyPress to WordPress Full Sync 0.3.3
    rtMedia for WordPress, BuddyPress and bbPress 4.5.3
    bbPress 2.5.14
    BP Profile Shortcodes Extra 1.4.2

    Any advice would be very greatly appreciated. Thank you!

    ps – If they got through, please delete the requests that I attempted to file at “https://buddyuser.com/plugin-bp-profile-shortcodes-extra/comment-page-1#comment-156”

    ~April

    cinematic

    (@cinematic)

    Hi, I am having the same problem. Trying to return xprofile fields and I am getting the error “The tab name is invalid”

    I have tried
    [bpps_profile_field field=”Company” tab=”primary”]

    [bpps_profile_field field=”Company” tab=”1″]

    What is the correct value to enter for tab?

    Thanks in advance for any tips!

    Plugin Author Venutius

    (@venutius)

    Hi there,

    I just tested with [bpps_profile_field tab=”Test” field=”Testing”] and it worked fine. Did you originally name the tab in all uppercase characters?

    Plugin Author Venutius

    (@venutius)

    That’s really odd – both of you having issues with it. Like I say I’m not able to replicate the issue.

    TreeTrail

    (@aprilschmitt27)

    Hi,

    Thank you for your super prompt response. Yes, the tab has been capitalized. In case it’s useful, using phpMyAdmin, I copied these from the database:

    SELECT * FROM wp_bp_xprofile_groups
    id name description group_order can_delete
    1 INDIVIDUAL Please carefully follow the below instructions whi… 1 0

    SELECT * FROM `wp_bp_xprofile_fields’
    id group_id parent_id text name
    2 1 0 textbox Phone Primary

    Plugin Author Venutius

    (@venutius)

    I’ve just tested it and the following work for a profile tab name of Test

    [bpps_profile_field tab=”Test” field=”Testing”]

    [bpps_profile_field tab=”TEST” field=”Testing”]

    using the id number of the tab does not work.

    So [bpps_profile_field field=”Phone Primary” tab=”INDIVIDUAL”] should have worked for you.

    • This reply was modified 6 years ago by Venutius.
    TreeTrail

    (@aprilschmitt27)

    Venutius,

    Great news …I just figured it out! A similar thing happened to me once before. While in WordPress page edit mode, you can not use the VISUAL tab. You must use the TEXT tab. I don’t know why this happens, but the ” (QUOTATION) character is not the same! (I use the WPBakery composer plugin and that may be different than WordPress alone.)

    ~April

    Plugin Author Venutius

    (@venutius)

    Hi April,

    Thanks for that, though in my case I’m using the visual tab and it works fine, but I’m wondering if it’s a country based issue.

    cinematic

    (@cinematic)

    Could it be that it has something to do that buddypress is running on a subsite of multisite in my case?

    Plugin Author Venutius

    (@venutius)

    It’s not been designed with multi-site in mind, that’s for sure. How would that change things do you know?

    cinematic

    (@cinematic)

    I have renamed the group, copy and pasted the group name in the text editor and still it says the tab is invalid.

    TreeTrail

    (@aprilschmitt27)

    Venutius,

    I think that this QUOTATION problem is described in the below article:

    https://www.ironpaper.com/webintel/articles/fix-wordpress-quotes-by-displaying-straight-quotation-marks/

    “By default, WordPress will convert your straight quotation marks into curvy quotation marks (Smart Quotes or left/right quotes). This function makes the quote marks much prettier than straight quotes, but they have a fundamental problem. When someone tries to cite your blog post or if you are posting a code snippet, the curvy quotes will cause errors and not display correctly as they are pasted into the new system, social media site or CMS/blog.”

    You can NOT see the difference in the quotes! But so far the code works when entered into the editor’s TEXT tab every time. It does not always work in the VISUAL tab. It seems that if you start entering in the TEXT tab, you can switch to the VISUAL tab …as if it recognizes your preference to enter CODE QUOTES rather than CHARACTER QUOTES.

    ~April

    Plugin Author Venutius

    (@venutius)

    So the solution would be to include the following in my code possibly?

    <?php
    remove_filter(‘the_content’, ‘wptexturize’);
    ?>

    Only I’m kind of concerned about the impact of removing that functionality.

    TreeTrail

    (@aprilschmitt27)

    I just found it yesterday, but you seem to have a great plugin and I really want to use it. I’m not suggesting that you change anything. This QUOTE thing is a known WordPress blog habit. Here are some references:

    https://www.ads-software.com/plugins/wpuntexturize/

    https://www.cyberscorpion.com/2011-05/how-to-turn-off-curly-quotes-in-wordpress-so-they-dont-break-your-php-tutorials/

    Perhaps all you need to do is very prominently note in your documentation, to only use the TEXT tab …when entering the shortcodes. After that designers can then use the VISUAL tab to format, etc.

    FYI, I’m a newbie and a non-coder, so your php is lost on me ??

Viewing 15 replies - 1 through 15 (of 33 total)
  • The topic ‘bpps_profile_field does not display unless user_id is hardcoded’ is closed to new replies.