Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile Field Setup href Bug?

  • Avatar of jensenrandy
    jensenrandy
    Member

    @jensenrandy

    I’m working using BuddyPress 1.0.1 and WPMU 2.7.1.

    When I add a Profile Field into BuddyPress and then add content into it, it turns the content into links for some reason. I was able to get it to _not do this, I’ll link to both examples below.

    Example that works: http://randyjensenonline.com/wpmutest/members/randyjensen

    Under “Enter Your Resume” field under “Base”, “Here is my resume on one line. Here is another line…why are these not links? Hello?” are NOT links.

    Example that doesn’t work: http://randyjensenonline.com/wpmutest/members/admin

    Under the “Enter Your Resume” field under “Base”, ‘blah blah blah’ are turned into links.

    Anyone know what’s going on?? Thanks!

Viewing 18 replies - 1 through 18 (of 18 total)
  • Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    If you view the source of your Admin profile page, you have something strange happening:

    <p><a href="http://randyjensenonline.com/wpmutest/members/?s=blah</p>
    <p>blah</p>
    <p>blah">blah</p>
    <p>blah</p>
    <p>blah</a></p>

    There is an “a” tag that does not close until the last “blah”. Did you place the href in there, or did it populate the field on its own after saving?

    Perhaps the infamous “Blah” bug–whatever that is. :)

    Avatar of jensenrandy
    jensenrandy
    Member

    @jensenrandy

    Thanks for the quick reply Jeff!

    I’m actually not using any HTML, that’s what is so weird about it. The code that is being output is being done by BuddyPress (or WP).

    I can give you the admin login if you think it will help, it’s just a testing site.

    I think I’ll refer to it as the “Blah” bug from now on :)

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    So this only appears to happen in the Admin user’s profile fields. Okay, a few more questions:

    1. What happens if you delete the “blah” data, save the emptied out field, and then reenter some data in that same field?
    2. What happens if you create a new text field and try entering data? Does it also create links?
    3. What happens if you delete that field then recreate it and enter data?

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    You said in your first post that you were able to make it not automatically create links. How did you manipulate that? My guess is something in that modification is causing the problem.

    If not, then the problem exists with the way the linefeed exists in the field.

    If it’s on 1 line, or comma separated, then they get linked; if not, then no.

    Avatar of jensenrandy
    jensenrandy
    Member

    @jensenrandy

    OK, I’ve been playing with it some more, it has nothing to do with the account.

    I was able to get it working as well as replicate the bug in both the admin account and my “randyjensen” account.

    This bug makes absolutely no sense.

    Not sure if this helps, but I recorded a quick video of it linking everything, then changing the text and then it works (view in fullscreen) http://www.screentoaster.com/watch/stVUtXS0dIR11bSVhVUlJZVFJW

    As for your questions above, nothing seems to make a difference, at least not that I can tell. Let me know if you want me to DM you the login details on Twitter so you can see exactly what is happening.

    Avatar of jensenrandy
    jensenrandy
    Member

    @jensenrandy

    Hey John, not 100% what you’re mean by comma separated. I’m putting in plain text into the field. It doesn’t seem to matter whether it’s one line of text or several, the linking seems to be done randomly.

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I’m posting this from my mobile so I don’t have access to BP code at the moment but I’ll find where the linking happens so you can see how it works. There’s a little science to it, but it’s actually working the way it’s coded to.

    Avatar of jensenrandy
    jensenrandy
    Member

    @jensenrandy

    Curious why if it’s working the way it’s suppose to, why it links text sometimes but not others?

    Also how come the linked text appears to be broken (which is what is seemingly causing all the text to be linked)?

    Just not sure how to proceed with this except for going into the code myself and disabling the linking which I’d prefer not to.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    I just tried this on a test site of mine. Within the Basic field grouping, all fields, including radio button fields, are turned into links. Yep, radio button fields. Tell me how that makes sense. It grabs the text from the selected option field and displays that as a link. I can understand it display the text from the selected radio button, but turning that into a link makes no sense at all.

    The linking occurs in other field groups as well, not just the basic field group.

    I’ll look at the codebase tomorrow to see what’s going on. I think it is something in get_edit_html() that is causing this issue.

    Avatar of jensenrandy
    jensenrandy
    Member

    @jensenrandy

    Thanks for looking into this. I’m glad you don’t think it makes any sense either :)

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    @jensenrandy-

    I’ve actually just isolated the bug. Interestingly enough, bp.org (this site) also has this bug. I suppose you could call it a feature, but creating links to what seems like nothing is a bug to me. Go into your profile on this site and look for yourself.

    Of course the clue was in the linking text I highlighted in my first post–but I failed to notice. I can get the profile fields to work properly by commenting out a certain filter. I’m trying to determine the proper patch. I’ll post the bug ticket number back here when I have it all figured out.

    Avatar of jensenrandy
    jensenrandy
    Member

    @jensenrandy

    Just checked and sure enough, it’s there. Funny that no one has stumbled on it..lucky me (or you I guess ;)

    Thanks for looking into this, I really appreciate it.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Update:

    By the way, I should have provided a little more detail. Whereas I call this a bug, technically what is happening is all profile data, except URLs, are filtered to make them searchable–unless the field data has more than 5 non-comma separated words in a row (don’t ask why that limit, I don’t know).

    So, if you hover your cursor over the field value, you’ll see this toward the end of the link:

    ?s=

    This creates a search link for the keyword or phrase which when clicked on should perform a search that brings up related results. Of course, on a development site, you more than likely will not have any relevant results.

    Whereas in general I like the idea of making data searchable via links (it’s sort of like tags), this implementation is flawed. At a minimum, it should not be linking the user’s “Full Name” field as the best search result for that is for the viewer to stay exactly where they currently are–on that member’s profile. Also, linking radio button groups or checkbox selections seems unnecessary. The data in these types of fields is often too specialized to be of much meaning in a search. Furthermore, the code arbitrarily excludes phrases over 5 words long. Finally, clicking on one of these links can be confusing to users as it sends them to the members homepage without explaining what is going on. Only in very large sites will any relevant results be returned.

    It might be nice if there was an administrative option to not make profile fields clickable.

    I have not yet figured out an appropriate patch to the filter function. But, when I do, I’ll add it to this trac ticket.

    In the meantime, if you wish to simply deactivate this “feature”, you could use a remove_filter() call to disable the offending filter.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    I’m going to set this thread to resolved because, while I and others (how many?) think it is a type of bug (it’s bugging me after all), the code itself is actually working as intended. I just think it needs to be altered to do things a little differently. I will take some time (at some point) and write a recommended patch.

    Avatar of jensenrandy
    jensenrandy
    Member

    @jensenrandy

    Thanks Jeff. I’ll go ahead and patch the file with solution above. Thanks again

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    @jensenrandy

    You’re welcome! I’m aiming to eventually help make this more intuitive, to make the implementation more meaningful.

    Avatar of henrybaum
    henrybaum
    Participant

    @henrybaum

    Any progress on this? I like having Location entries clickable (city, state) but nothing in the About section, so I don’t want to turn it off completely.

    For me, this doesn’t happen every time. Most times, the About field info isn’t clickable. But when I added HTML (to see if it worked) then deleted that info and added something else, the new info was clickable.

    Good: http://www.diymusicreview.com/members/henry-baum/

    Bad: http://www.diymusicreview.com/members/kristen-tsetsi/

    Replying to six month old threads that have been marked as ‘resolved’ (Green traffic light) will mean most people will skip the thread.

    But, http://wordpress.org/extend/plugins/custom-profile-filters-for-buddypress/

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

You must be logged in to reply to this topic.