Skip to:
Content
Pages
Categories
Search
Top
Bottom

Strange injection of email address on text with @baseurl

  • Avatar of Joss Winn
    Joss Winn
    Participant

    @josswinn

    Hello,

    This is difficult to explain, but you can see an example here:

    http://test.blogs.lincoln.ac.uk/2014/01/28/test-again/

    You’ll see that whenever @lincoln.ac.uk appears either in the text or as a mailto: link, the base URL plus a user’s email address is hyperlinked to the text.

    You’ll see ‘http://blogs.lincoln.ac.uk/amakrzanowska%40lincoln.ac.uk/’ appearing as a link, but at no point have I created and inserted that link. Something is doing it automatically. If I delete that user, another user’s email address appears instead, so it’s not related to any user account.

    Text referring to other domains, such as @lncd.org or @blah.org have no effect.

    This happens with any theme on any site on the network and is resolved if I deactivate BuddyPress, which is why I’m posting this here.

    Thanks for any advice. I’m at a loss to know what to do. If it makes any different, we’ve been running BuddyPress on this site since it was in Beta and noticed the problem a few days ago. Could it be a problem relating to recent changes in BuddyPress?

    Joss

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of Joss Winn
    Joss Winn
    Participant

    @josswinn

    UPDATE:

    I’ve changed BuddyPress from being ‘network activated’ to just ‘activated’ on the main/root site. I don’t know what the recommended setup is these days, but we’ve had it network activated since BuddyPress only ran on WPMU.

    Having it activated on the main site only means that the ‘bug’ now only affects the main site and not every site across the network. So the example I give above no longer shows the issue.

    However, you can still see it on this page:

    http://blogs.lincoln.ac.uk/test/

    See how, whenever there is @lincoln.ac.uk either in the content of the page, or in a mailto link, BuddyPress injects a hyperlink with a random user’s email address following the root domain:

    http://blogs.lincoln.ac.uk/amakrzanowska%40lincoln.ac.uk/

    I’ve no idea how or why it’s constructing that URL and automatically inserting it whenever @lincoln.ac.uk is found in the body content.

    Ideas much appreciated!

    Avatar of BuddyBoss
    BuddyBoss
    Participant

    @buddyboss

    I’ve never seen that before. Standard advice is to switch themes and deactivate all plugins, then switch everything back one by one to see if a specific theme/plugin is the cause.

    If not, BuddyPress does automatically inject links into some content. Profile fields for example, when viewing a user’s profile. Weird that it’s doing this on a random WP page though.

    As for ‘network activated’ I suggest leaving it to just ‘activated’ on your main site that you’re running BP on. No reason to run it everywhere.

    Avatar of Joss Winn
    Joss Winn
    Participant

    @josswinn

    Hi again,

    I still have this problem. I’m sure it’s BuddyPress that is the cause, as it still occurs with different themes and with all other plugins deactivated. When I deactivate BuddyPress, the problem stops.

    Run your mouse over the links on this page, and you’ll see the issue: http://blogs.lincoln.ac.uk/test/

    I was wondering whether it is a legacy of running BuddyPress since alpha/beta and whether there is an old setting in the database or something that I might look out for. Where are the BuddyPress settings stored in the database? None of the wp_bp tables look like they hold global settings.

    In my wp-config.php file, I have the following:

    define( ‘BP_ENABLE_ROOT_PROFILES’, true ); //removes the /members/ slug
    define( ‘BP_DEFAULT_COMPONENT’, ‘custom-profile’ ); //defaults to profile page rather than activity stream of a user
    define( ‘BP_ENABLE_USERNAME_COMPATIBILITY_MODE’, true ); //for LDAP compatibility
    define ( ‘BP_IGNORE_DEPRECATED’, true );
    define(‘BP_USE_WP_ADMIN_BAR’,true);

    Thanks for any advice,
    Joss

    Avatar of Joss Winn
    Joss Winn
    Participant

    @josswinn

    I suppose another way of looking at this would be to find the code in BuddyPress that injects hyperlinks into certain text, such as profile tags. Where would I find this?

    Thanks.

    Avatar of Joss Winn
    Joss Winn
    Participant

    @josswinn

    For the record, I’ve narrowed it down to the ‘Activity Streams’ component of BuddyPress. When this is disabled, the problem does not occur.

    Avatar of Joss Winn
    Joss Winn
    Participant

    @josswinn

    … and if I activate ‘Activity Streams’ but add

    add_filter( 'bp_activity_do_mentions', '__return_false' );

    to bp-custom.php, the problem is resolved.

    So it looks like, for some reason, I can’t have mentions enabled without the problem occurring. Can anyone think why?

    Thanks,
    Joss

    Avatar of henrywright
    henrywright
    Participant

    @henrywright

    Hi @josswinn

    Is this ticket related to your problem by any chance?

    https://buddypress.trac.wordpress.org/ticket/4680

    Avatar of Joss Winn
    Joss Winn
    Participant

    @josswinn

    Yes! That’s it. Thanks for pointing this out, Henry. I shall link the bug report to this thread and offer to help bug test.

    Cheers
    Joss

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

You must be logged in to reply to this topic.