Hi, i have the following problem with addthis, tested on 2 different 5.x-sites:

This is the result of sharing via mail:
--
addthis test

/node/1069?Array

[Message sent by foo@bar.com via AddThis]
--

And this is the url when i try to submit to myspace:
--
http:///node/1069?Array
--

CommentFileSizeAuthor
#10 absoluteurl.patch668 byteskingandy

Comments

rasmusmp’s picture

I have the same problem. I have outcommented:

/* addthis_offset_top = \'%d\';
addthis_offset_left = \'%d\'; */

But that should not have an effect. Any solution?

vesapalmu’s picture

Assigned: Unassigned » vesapalmu
Status: Active » Fixed

This has now been fixed in 2.1 version for D5.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

ttotade’s picture

Status: Closed (fixed) » Active

No it has not been fixed, I am using 2.1 with drupal 5.x and I am still getting the same problems as explained above.

vesapalmu’s picture

Status: Active » Postponed (maintainer needs more info)

Then it is a new issue. This issue was originally related to offset handling and that has now been disabled. Please provide more information about the issue. Does this happen always? In every page? With all browsers?

gaijinu’s picture

I second this, it happens in FF3 and IE6 when the button is set to appear in the teaser. When it's on the full node view the url is sent fine. When is on the teaser only the http://node_name/ is sent to the bookmarking services.

Please take a look here: http://muaythai.sg/

Using the 5.x-2.1 version.

Thank you.

bobbydonohue’s picture

I'm experiencing this also on several web sites. I can confirm that it works fine on the full node, but not the teaser.

gaijinu’s picture

Any news? Thanks.

Mindy Block’s picture

still an issue with the teaser, but works so far as I see it, with the full node post...

kingandy’s picture

Version: 5.x-2.0-beta5 » 5.x-2.1
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new668 bytes

This looks like something that has been addressed in the 6.x version but was never backported ... on line 221 the URL is added using url('node/'.$node->nid). We need to specifically tell url() to generate this as an absolute URL (ie, including the domain) rather than relative to the base path.

In Drupal 6 this is done with a settings array, but in D5 we need to add a series of defaulted variables between the URL and the 'absolute' parameter. The line becomes: $teaser ? url('node/'. $node->nid, NULL, NULL, TRUE) : '[URL]',

Find attached a patch to apply this to the current 5.x-2.1 build.

kingandy’s picture

Ha ha! I just ran into this again and look, here's my fix from the last time. How handy. Thanks, past me!

vesapalmu’s picture

I think we need a new 5.x branch maintainer for the module. Sorry about this taking a loooooong time. I am trying to clean up the issue queue and get back to 5.x issues also.

edgartanaka’s picture

Version: 5.x-2.1 » 6.x-2.0

This is a possible fix. I tried this on function addthis_link(). My version is D6.
It worked here.

/**
 * Implementation of hook_link().
 */
function addthis_link($type, $node = NULL, $teaser = FALSE) {
 ...
  
  $addthis_widget_type = variable_get('addthis_widget_type', 'addthis_button');
  

	$query = explode('&', $_SERVER['QUERY_STRING']);
	$urlParams = array();
	foreach($query as $param) {		
		list($name, $value) = explode('=', $param);
		if($name != 'q'){
			$urlParameters .= '&'.($name).'='.($value);
		}
	}

  $links = array();
  $links['addthis'] = array(
    'title' => theme($addthis_widget_type, NULL, array(
      'url' => url('node/' . $node->nid, array('absolute' => TRUE,  'query' => $urlParameters )),
      'title' => $node->title,
    )),
    'html' => TRUE,
  );

  return $links;
}


gisle’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

This bug is no longer present in the current version (7.x-1.x) of the module.

I don't know if it has been fixed for D6, but that version is no longer supported (and I only maintain the D7 version).

If somebody want to see the D6 version of this module still maintained, they need to contact the project owner and sign on as co-maintainer.