I am using the node/71 as a front page node. This is a plain page node type, it's path alias is "cimlap".
I enabled the service links to show on pages. Then I realised the facebook share and any other links are wrong because they are using the http://mysite.domain/cimlap path. But, I would like to share the http://mysite.domain/ only. There are no a "/cimlap" url really.
I made a patch against 2.x-dev.
I have just tested it, I seems work in the links and links in nodes places too.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | service_links-980938-12-front_page.patch | 556 bytes | simon georges |
| service_links_on_a_front_node.patch | 1.21 KB | denes.szabo |
Comments
Comment #1
TheCrow commentedReworked the patch and committed it, thank you!
Comment #3
2phaI had the same problem with 6.x-2.1.
I just changed
if ($settings['link_to_front']) {
to
if ($settings['link_to_front'] || drupal_is_front_page()) {
in the _service_links_get_page_url function
worked for me
Comment #4
TheCrow commentedThanks @2pha, pushed it!
Comment #5
donquixote commentedHi,
I have the same problem on D7, and I don't see any trace of the patch in the current 7.x-2.x-dev release.
Is this committed?
Thanks!
Comment #6
2phaline 801 of service_links.module
Comment #7
2phaComment #8
donquixote commentedThanks for the quick reply!
_service_links_get_node_path()
On my site, $node->uri is empty, so this does not work.
Instead, you need this:
(linebreaks added only for readability in this post)
Comment #9
2phaIC, I can't help you with that, I never had the problem when using this module.
Comment #10
donquixote commentedOk, I hope the maintainer will see this :)
Comment #11
juliangb commentedWhat is the status of this issue? (I've noticed the problem too).
Comment #12
simon georges commentedCorresponding patch.
All credit goes to donquixote.
Comment #13
juliangb commentedI tested the patch (including clearing patches), but it didn't seem to work for me:
I was testing without using any short URLs, so that I could directly see the path that was being linked to.
When I clicked the Tweet button, there was still the /node path after my domain.
In otherwords:
- Expected to see: http://www.example.com
- Actually saw: http://www.example.com/node
Please let me know if there is anything different I should be doing to test this.
Comment #14
simon georges commentedI can confirm the patch works for me with the tweet button as well.
I don't understand what could possibly be happening for you, juilangb. Would you eventually use some modules that plays with the front page (like "Front page" or similar)?
Comment #15
juliangb commentedNo, I don't use any modules like that.
The front page is just a view, directly set in the site settings.
Comment #16
simon georges commentedOh... This patch only changes the node behaviour. Let me see what could happen for Views.
Comment #17
simon georges commentedIn the meantime, as the issue is only for nodes, let's put the status back to "Needs Review".
Comment #18
TheCrow commentedCommitted, thank you!