Recently whenever I click the facebook share button the share window pops up and populates fine, however the main window resolves to http://www.addthis.com/bookmark.php?v=300 -in the past it's always stayed on the same page.

It is a recent occurrence, and it's happening on a number of sites that I maintain. The behavior is uniform on all sites and all browsers. I'm not sure if this only started happening with the latest Drupal update or not.

Anyone else experiencing this issue?

CommentFileSizeAuthor
#22 facebook-share-link-2459503-22.patch764 bytesVenDG

Comments

lukus’s picture

I can confirm the same. I've also noticed that addthis are now inserting inline CSS into their toolbox markup. I've opened another ticket here: https://www.drupal.org/node/2459929

lukus’s picture

Category: Support request » Bug report

Changing category to bug report.

lukus’s picture

Changing category to bug report.

L.A.’s picture

I had the same issue last week (also tried the dev version, same thing), but it works again (without a change).
I guess this was a bug concerning AddThis itself, not the Drupal Modul.

matglas86’s picture

Status: Active » Closed (works as designed)
djeba’s picture

I have the same issue

lias’s picture

I'm experiencing the same popup of the addthis bookmark when I click on the Facebook icon. This doesn't occur when I click on the Twitter icon.

maxferrario’s picture

@matglas86: what do you exactly mean with "works as designed"?
I only see this behaviour with Facebook share buttons, and it's really a BAD behaviour...
No one is going to fix this?

matglas86’s picture

Somebody mentioned that this is a behaviour produced by addthis and not the module.

Works as designed means the module does what is does. If the addthis service has a bug we can not fix that. But if someonen figures out that its really a bug in this addthis module be welcome to change the status.

SilviaT’s picture

Same problem here. Works fine with other services (Twitter, Pinterest, G+, Tumblr..) but doens't with Facebook service.

p.act’s picture

I have the same issue with Facebook redirect to http://www.addthis.com/bookmark.php?v=300. For the temp. fix, I put the "#" sign under /admin/config/user-interface/addthis/advanced > Service URL's, AddThis bookmark URL > #, instead of http://www.addthis.com/bookmark.php?v=300.

matglas86’s picture

Status: Closed (works as designed) » Fixed

There was a problem with the a link. It did include the link to bookmarks. Why? I really don't know.

abasso’s picture

@matglas86: that' great, thanks, however I cannot see this commit... is it not in the dev branch yet? Thanks!

  • 2b5aab4 committed on 7.x-4.x
    Issue #2459503: Facebook share link causes main page to go to http://www...
matglas86’s picture

:) Sorry. I pushed it to my github repo but forgot to push it to the drupal repo too.
The commit should show up here too in a bit.

abasso’s picture

It works! perfect, thanks!

beezer75’s picture

Thanks all, comment 11 fixes the issue. Replace url with #

leendertdb’s picture

Hi everyone,

I have also had this same problem. However the solution in #11 and the patch in #14 didn't work for me because my theme is using the base tag. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base. While the use of this tag is discouraged, I guess there will still be some Drupal websites using this.

The base tag makes all links relative to what is specified as the base, useful if your Drupal site is placed in a subdirectory. In my case the base tag in the html.tpl.php template file of my theme is made like this:

<base href="<?php print base_path(); ?>" />

Drupal host: "localhost"
Full path to drupal: "http://localhost/drupal/"
Base tag: "http://localhost/drupal"

So let's say I have a node with the following URL:
http://localhost/drupal/blog/test-blog-node.

In this case the <a href="#"> using the base tag actually becomes <a href="http://localhost/drupal/#">, which is different from the current page URL so the window still gets redirected.

Could you maybe instead of leaving out the href tag as you did in commit #11 (in which case Drupal will assign a hashtag by default) replace it with the following?

File: addthis/addthis_displays/addthis_displays.addthis.inc
Line: 46

$items[$service] = array(
      '#theme' => 'addthis_element',
      '#tag' => 'a',
      '#value' => '',
      '#attributes' => array(
        'href' => request_uri() . '#',
        'class' => array(
          'addthis_button_' . $service,
        ),
      ),
      '#addthis_service' => $service,
    );

So i'm talking about adding this line:

'href' => request_uri() . '#',

This way it should work in all cases. Any thoughts?

leendertdb’s picture

Status: Fixed » Needs work
Anonymous’s picture

For me, fix #18 get's the same output as #11.
Cheers

chuchu1’s picture

I have the same issue.
http://ueher.com

VenDG’s picture

StatusFileSize
new764 bytes

Created a patch file for #18

gisle’s picture

Version: 7.x-4.0-alpha4 » 7.x-4.x-dev
Status: Needs work » Postponed (maintainer needs more info)

Patch in number #22 no longer applies to head of 7.x-4.x because the href-attribute is gone.

   $items[$service] = array(
      '#theme' => 'addthis_element',
      '#tag' => 'a',
      '#value' => '',
      '#attributes' => array(
        'class' => array(
          'addthis_button_' . $service,
        ),
      ),
      '#addthis_service' => $service,
    );

Can one of the people that experience this bug check out the latest dev snapshot of 7.x-4.x and state whether this bug is still present in that version or not.

leendertdb’s picture

@23,

I can confirm that my bug report explained in #18 no longer applies to the current head of 7.x-4.x. It works correctly for us now without needing a patch.

Since the codebase of this module didn't change since my observations of #18 I'm assuming that AddThis made some changes on their side to fix this bug.

I think we can close this issue.

gisle’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

I think we can close this issue.

Great!

I'm trying to close out all open bugs in the 7.x-4.x branch before creating a new tagged release (alpha7).

ben833’s picture

The dev branch fixes the issue for me. Please create the alpha7 tag, so we don't have to use a dev branch on production.