Project:Share Buttons (AddToAny) by Lockerz
Version:7.x-4.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

When the module is displayed as a Block, every URL that is shared appears as "domain/"

Comments

#1

Category:bug report» support request
Priority:major» normal
Status:active» closed (works as designed)

When AddToAny is displayed as a Block, the current node URL is shared, otherwise the frontpage URL is shared.

Please update with specific details if you're experiencing some other related problem.

#2

Category:support request» bug report
Status:closed (works as designed)» active

I can confirm this, to give you more info, this happens on a page that is not a node, for instance the standard drupal contact page, or a views created page.

#3

Version:6.x-3.3» 7.x-4.0

Same issue here. If I place the block on a page which is not a node then I want the current page title and current page url to be submitted. Here's my quick hack to addtoany.module:
At line 235 replace

} else { // Front page
$link_name = (module_exists('page_title')) ? page_title_page_get_title() : variable_get('site_name', 'Drupal');
$link_url = url('<front>', array('absolute' => 1));

with
} else { // Current page
$link_name = (module_exists('page_title')) ? page_title_page_get_title() : drupal_get_title();
$link_url = url(current_path(), array('absolute' => 1));

Seems a bit complicated to use the node object to determine the current title and path anyway - my code above would work on any page regardless of it being a node or otherwise - or am I missing something?