Automattic / Automattic/jetpack

Sharing Buttons don't work when added to Homepage template

Open
#42,933 1 comment 0 reactions 0 assignees View on GitHub
[Block] Sharing Button [Block] Sharing Buttons [Feature] Sharing [Plugin] Jetpack [Pri] Normal Bug Customer Report [LEGACY] Triaged
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

None / Other

### Quick summary

When adding a Sharing Buttons block to the default Homepage template (i.e., Index template), and with no posts on the site, clicking the sharing buttons will open the site’s homepage in a new browser window instead of sharing the page.

https://github.com/user-attachments/assets/26900d76-d7d7-4522-84a8-100cc4f6a4c0

Reported in 9611351-zd-a8c

### Steps to reproduce

1. Make sure your site has a block theme active and the site has no posts.
2. Set homepage to display 'Your latest posts' under Settings > Reading
3. Add the [Sharing Buttons ](https://wordpress.com/support/wordpress-editor/blocks/sharing-buttons-block/) block to the Index template via site editor.
4. Click on the sharing buttons from the Homepage. Each button will open a new window to the Homepage instead of sharing it to the chosen platform.

### Site owner impact

Fewer than 20% of the total website/platform users

### Severity

Moderate

### What other impact(s) does this issue have?

No revenue impact

### If a workaround is available, please outline it here.

The workaround is to set a static Homepage and add the Sharing Buttons block to the static page.

### Platform (Simple and/or Atomic)

Atomic, Simple

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with a block theme, no posts, the Index template, and the Sharing Buttons block, then inspect how the buttons determine the page URL in that empty-homepage state. Done means each button opens the selected sharing service with the intended page rather than the site's homepage.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php, react, wordpress
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.