gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Social Links block is set to display: none on frontend after load

Open elphizu opened this issue 10 months ago • 8 comments

Description

The core Social Links block renders for a millisecond on the frontend and then disappears completely. This is not a visual flash

the block is removed from layout because its computed style resolves to display: none after page load.

The block markup remains in the DOM. The issue occurs using only the Block Editor with no plugins and a default WordPress theme.

Expected Behavior: The Social Links block should remain visible and rendered on the frontend.

Actual Behavior: The Social Links block renders for a millisecond, then disappears entirely once styles are applied.

After page load, running the following in the browser console:

getComputedStyle(document.querySelector('.wp-block-social-links')).display

returns: none

Step-by-step reproduction instructions

  1. Install WordPress (fresh install)
  2. Activate a default core theme (e.g. Twenty Twenty-Five)
  3. Create a page using the Block Editor
  4. Add a Social Links block (any icons)
  5. Publish the page
  6. Load or hard-refresh the page on the frontend

Screenshots, screen recording, code snippet

https://github.com/user-attachments/assets/cb86aca7-f46d-4f53-84e1-66cb81383f06

Environment info

Environment: LocalWP (local development) WordPress: 6.9 Gutenberg: Not installed (using block editor bundled with WordPress core) Theme: Twenty Twenty-Five Plugins: None Browser: Brave 1.86.139 OS: macOS

Please confirm that you have searched existing issues in the repo.

  • [x] Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • [x] Yes

Please confirm which theme type you used for testing.

  • [x] Block
  • [ ] Classic
  • [ ] Hybrid (e.g. classic with theme.json)
  • [ ] Not sure

elphizu avatar Jan 20 '26 05:01 elphizu

This isn't something that I can reproduce. I tested using a clean 6.9 in WordPress Playground.

@GivenBY Is there a chance you have browser add-ons or anything similar that might be interfering with the block?

I'll close the issue, but it can always be re-opened if there are other reports.

talldan avatar Jan 20 '26 06:01 talldan

@GivenBY It appears that the link is not being applied because the Apply (arrow) icon is not being clicked. The link is only added successfully after clicking the Apply icon. Only then, the social links are displayed on frontend.

Screenshot

Image

cc @talldan

mi5t4n avatar Jan 20 '26 06:01 mi5t4n

@mi5t4n i applied and tested everywhere even playground trunk have this issue something related to this https://github.com/WordPress/gutenberg/issues/74062

https://github.com/user-attachments/assets/f753592f-3aae-4472-bb7c-521d4e880d3c

elphizu avatar Jan 20 '26 06:01 elphizu

The reproduction in the other video was completely different.

Can you try using a different browser or incognito mode?

talldan avatar Jan 20 '26 06:01 talldan

It appears that the link is not being applied because the Apply (arrow) icon is not being clicked. The link is only added successfully after clicking the Apply icon. Only then, the social links are displayed on frontend.

I can't reproduce that either:

https://github.com/user-attachments/assets/92b8b74c-3f75-4096-a3de-cb61f73636f0

Also you haven't typed a valid URL in the screenshot, so maybe that's the issue. Perhaps it's the OPs issue too, it's not easy to see what's copied/pasted from the clip.

talldan avatar Jan 20 '26 07:01 talldan

The URL shown in the screenshot was provided only for reference and was not the one I used. I am also unable to reproduce the issue at this time.

https://github.com/user-attachments/assets/4424a7db-035b-4260-a4bc-f01d1bdd01c6

mi5t4n avatar Jan 20 '26 07:01 mi5t4n

Yeah, same for me. I’ve tested this and the Social Links block is rendering correctly on the frontend. Everything seems to be working as expected, and I’m unable to reproduce the issue.

Mustafabharmal avatar Jan 20 '26 07:01 Mustafabharmal

I will test this in a different browser and ensure that no cached data is present. Apologies for the inconvenience.

elphizu avatar Jan 20 '26 08:01 elphizu