Make WordPress Core

Opened 2 months ago

Closed 8 weeks ago

Last modified 7 weeks ago

#61660 closed defect (bug) (fixed)

links are now underlined

Reported by: annubis's profile Annubis Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.6.1 Priority: high
Severity: normal Version: 6.6
Component: Editor Keywords: gutenberg-merge needs-testing has-testing-info dev-reviewed commit fixed-major
Focuses: css Cc:

Description

after update to wordpress 6.6 all links are now underlined.

Attachments (4)

Before-test-plugin-showing-the-issue.png (340.4 KB) - added by hellofromTonya 2 months ago.
Test Report: Can reproduce the issue. Shows the underlined links before activating the test plugin.
After-test-plugin-issue-resolved.png (349.0 KB) - added by hellofromTonya 2 months ago.
Test Report: Issue resolved (no link underlines) after activating the test plugin (with the fix).
6.5.5 compared to 6.6 with fix.png (591.2 KB) - added by hellofromTonya 2 months ago.
Test Report: With fix applied, side-by-side comparison of 6.5.5 and 6.6 with the fix (via the test plugin).
6.5.5 compared to 6.6.0.png (636.6 KB) - added by hellofromTonya 2 months ago.
Test Report: side-by-side comparison of 6.5.5 and 6.6.0 (without the fix)

Download all attachments as: .zip

Change History (46)

#1 follow-up: @joedolson
2 months ago

  • Keywords reporter-feedback added

Please add some context to this; we'll need to know something about where you're seeing unexpected underlines to be able to act on this in any way. It seems unlikely that this belongs in the Permalinks component, but without any context, it's hard to say.

#2 @butterflymedia
2 months ago

  • Keywords reporter-feedback removed

I have already opened a ticket on the block editor on GitHub, and they said there is a hotfix for 6.6.1. Here is the link - https://github.com/WordPress/gutenberg/issues/63345

Still, there is a bunch of :root and :where styles overriding everything. Another example would be all centred images are now left aligned.

Regarding the underline, their reply was that this is common behaviour for browsers to underline links…

Here is the selector being added by the core:

:root :where(a:where(:not(.wp-element-button))) {
    text-decoration: underline;
}
Last edited 2 months ago by butterflymedia (previous) (diff)

#3 @swissspidy
2 months ago

  • Component changed from Permalinks to Editor
  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Closing as reported-upstream as this was reported & fixed in Gutenberg and should be resolved in WP 6.6.1.

#4 @swissspidy
2 months ago

#61661 was marked as a duplicate.

#5 follow-up: @butterflymedia
2 months ago

This is how I solved it, in case anyone stumbles upon this ticket. I put the code below in my theme:

:root :where(a:where(:not(.wp-block-navigation))),
:root :where(a:where(:not(.wp-element-button))) {
    text-decoration: initial;
}

#6 in reply to: ↑ 1 @Annubis
2 months ago

Replying to joedolson:

Please add some context to this; we'll need to know something about where you're seeing unexpected underlines to be able to act on this in any way. It seems unlikely that this belongs in the Permalinks component, but without any context, it's hard to say.

i saw this after i updated my wordpress projects - i use gutenberg and divi and other themes and this happens after the update. for me this means that it is not a theme bug

why? i dont know - I thought this was a wp update bug and wanted to report it.

sorry, this was my first ticket i started and i haven't seen any others with this topic before

#7 @joedolson
2 months ago

#61663 was marked as a duplicate.

#8 follow-up: @joedolson
2 months ago

@annubis The kind of context that's relevant are things like "where on your site are you seeing this?" Based on what you initially reported, I wouldn't even know that this was an issue on the front-end vs the back-end. A screenshot showing an example of the issue is always helpful. Opening an issue is a perfectly good response to seeing something unexpected! We just need to know a bit more about what you're seeing and where to be able to move forward.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


2 months ago

This ticket was mentioned in Slack in #core-editor by hellofromtonya. View the logs.


2 months ago

#12 @hellofromTonya
2 months ago

  • Keywords gutenberg-merge added
  • Milestone set to 6.6.1
  • Resolution reported-upstream deleted
  • Status changed from closed to reopened

Though this has been reported upstream and a patch merged into Gutenberg, thinking it might be better to reopen and milestone this Trac ticket for tracking and testing purposes.

Assuming the Gutenberg patch resolves it, this Trac ticket will then be closed as fixed by the package updates commit.

#13 @andrewserong
2 months ago

Assuming the Gutenberg patch resolves it, this Trac ticket will then be closed as fixed by the package updates commit.

It looks like it'll also need this backport PR to be committed: https://github.com/WordPress/wordpress-develop/pull/7012

Also logged in this trac ticket: https://core.trac.wordpress.org/ticket/61630

This ticket was mentioned in Slack in #core-editor by jorbin. View the logs.


2 months ago

#15 in reply to: ↑ 5 @aaronrobertshaw
2 months ago

Replying to butterflymedia:

This is how I solved it, in case anyone stumbles upon this ticket. I put the code below in my theme:

:root :where(a:where(:not(.wp-block-navigation))),
:root :where(a:where(:not(.wp-element-button))) {
    text-decoration: initial;
}

An alternative to the above change would be to ensure that somewhere in the CSS selectors for links there is a classname or class-level selector.

A discussion around such a temporary fix can be found in https://github.com/WordPress/gutenberg/issues/63345#issuecomment-2224249574

i use gutenberg and divi and other themes and this happens after the update. for me this means that it is not a theme bug

The fix for this issue in https://github.com/WordPress/gutenberg/pull/63403 will be available in GB 18.8 which should be released today.

#16 follow-ups: @jorbin
2 months ago

To make it easier to test, a small group of us (in the thread shared above) have created a version of the Gutenberg Plugin that you can install. This plugin should be equal to what was shipped in WordPress 6.6 with one additional fix. This testing method is assuming that you do not have the Gutenberg plugin already activated on your site. If you do, please wait for Gutenberg 18.8 coming later today. A few additional notes:

  1. This is the first time we are trying this method of testing a fix, so it's possible there are some side effects. As always, you are encouraged to test on a staging site or locally if at all possible.
  1. Due to this novel testing method, this version of GB has a version number that is in the past. Please don't upgrade Gutenberg even though you will immediately be notified that a new version is available
Last edited 2 months ago by aaronrobertshaw (previous) (diff)

#17 @hellofromTonya
2 months ago

Multiple reports in the same support forum request.

Pointed users here, asking them to test using the test plugin on the affected sites.

#18 in reply to: ↑ 16 @hellofromTonya
2 months ago

  • Keywords needs-testing has-testing-info added

For those testing the proposed fix (using the test plugin), here's more information to help:

This test plugin is available for you to test if the proposed fix (which is in the plugin) resolves the issue.

Replying to jorbin:

To make it easier to test, a small group of us (in the thread shared above) have created a version of the Gutenberg Plugin that you can install. This plugin should be equal to what was shipped in WordPress 6.6 with one additional fix. This testing method is assuming that you do not have the Gutenberg plugin already activated on your site. If you do, please wait for Gutenberg 18.8 coming later today. A few additional notes:

  1. This is the first time we are trying this method of testing a fix, so it's possible there are some side effects. As always, you are encouraged to test on a staging site or locally if at all possible.
  1. Due to this novel testing method, this version of GB has a version number that is in the past. Please don't upgrade Gutenberg even though you will immediately be notified that a new version is available

On sites that do not already have the Gutenberg plugin installed, here are the testing steps:

  1. Download the plugin.
  2. Unzip it.
  3. Install the plugin zip file into the affected site (preferably in a local or staged environment).
  4. Activate the plugin.
  5. Go to or refresh the frontend.
  6. Note if the underline issue is resolved or not.
  7. Deactivate and delete the plugin.
  8. Report findings here.

On sites that do have the Gutenberg plugin installed, please use these steps:

  1. Go to Plugins.
  2. Check the version of the Gutenberg plugin. If not version 18.8, please upgrade it.
  3. Make sure the plugin is activated.
  4. Go to or refresh the frontend.
  5. Note if the underline issue is resolved or not.
  6. Report findings here.
Last edited 2 months ago by hellofromTonya (previous) (diff)

#19 @jchambo
2 months ago

  • Severity changed from normal to critical

When can we expect an update to revert this?

#20 follow-up: @jorbin
2 months ago

  • Severity changed from critical to normal

@jchambo as of now, the team is exploring https://github.com/WordPress/gutenberg/pull/63403 as a fix. Can you follow the testing instructions in mine and @hellofromTonya's comments above and report back if it resolves it for you?

#21 in reply to: ↑ 20 ; follow-up: @jchambo
2 months ago

Replying to jorbin:

@jchambo as of now, the team is exploring https://github.com/WordPress/gutenberg/pull/63403 as a fix. Can you follow the testing instructions in mine and @hellofromTonya's comments above and report back if it resolves it for you?

This solves my issue when using Divi via inputting it in the CSS:

/*Fix WordPress v6.6 Underline Text Issue*/
:root a:not(.wp-element-button) {
text-decoration: none;
}

#22 @hellofromTonya
2 months ago

@jasko40 tested the testing plugin and confirmed all links are no longer underlined. Coping the their post here.

https://wordpress.org/support/topic/6-6-update-caused-underline-on-all-links/#post-17896314

Before state:

Before testing 18.5.0-rc.1 , all text links, button links with text in them, and menu links were all underlined.

After installing/activating the test plugin with the fix:

I was able to test the supplied Gutenburg plugin test (vers 18.5.0-rc.1). After install the underlining issue appears to be fixed! I’m also not currently noticing any new problems created by it yet.

#23 in reply to: ↑ 21 @hellofromTonya
2 months ago

Replying to jchambo:

This solves my issue when using Divi via inputting it in the CSS:

/*Fix WordPress v6.6 Underline Text Issue*/
:root a:not(.wp-element-button) {
text-decoration: none;
}

Hello @jchambo, are you able to test using the test plugin without the CSS workaround?

#24 @hellofromTonya
2 months ago

Props to @raquelandefeld for lending me up a testing version of the Divi theme.

Test Report

Patch tested: used version of the Gutenberg plugin which included the fix.

Environment

  • WordPress: 6.6.0
  • Browser: Firefox v 128.0 and Edge v 126.0.2592.102
  • PHP: 8.3
  • Web server: nginx
  • Theme: Divi v 4.26.1
  • Plugins: Test plugin

Steps to Reproduce or Test

  1. Install and active the Divi theme.
  2. Refresh the frontend.
  3. 🐞 Observe all links are underlined.
  4. Install and activate the test plugin.
  5. Refresh the frontend.
  6. ✅ Observe the links are no longer underlined.

Actual Results

Before activating the test plugin:

  • ❌ Error condition occurs. (Can reproduce it)

After activating the test plugin:

  • ✅ Issue is resolve and no noticeable side effects.

@hellofromTonya
2 months ago

Test Report: Can reproduce the issue. Shows the underlined links before activating the test plugin.

@hellofromTonya
2 months ago

Test Report: Issue resolved (no link underlines) after activating the test plugin (with the fix).

@hellofromTonya
2 months ago

Test Report: With fix applied, side-by-side comparison of 6.5.5 and 6.6 with the fix (via the test plugin).

@hellofromTonya
2 months ago

Test Report: side-by-side comparison of 6.5.5 and 6.6.0 (without the fix)

#25 in reply to: ↑ 16 @Annubis
2 months ago

Replying to jorbin:

To make it easier to test, a small group of us (in the thread shared above) have created a version of the Gutenberg Plugin that you can install. This plugin should be equal to what was shipped in WordPress 6.6 with one additional fix. This testing method is assuming that you do not have the Gutenberg plugin already activated on your site. If you do, please wait for Gutenberg 18.8 coming later today. A few additional notes:

  1. This is the first time we are trying this method of testing a fix, so it's possible there are some side effects. As always, you are encouraged to test on a staging site or locally if at all possible.
  1. Due to this novel testing method, this version of GB has a version number that is in the past. Please don't upgrade Gutenberg even though you will immediately be notified that a new version is available

yes i can confirm this "gutenberg.zip" plugin solutions works. after plugin activation the underline are gone

#26 in reply to: ↑ 8 @Annubis
2 months ago

Replying to joedolson:

@annubis The kind of context that's relevant are things like "where on your site are you seeing this?" Based on what you initially reported, I wouldn't even know that this was an issue on the front-end vs the back-end. A screenshot showing an example of the issue is always helpful. Opening an issue is a perfectly good response to seeing something unexpected! We just need to know a bit more about what you're seeing and where to be able to move forward.

thanks for a light criticism - you're absolutely right. i'll go into more detail next time i report something. sorry and thanks

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


2 months ago

#28 follow-up: @clarktbt
8 weeks ago

I just tried the Gutenberg plugin in one of my Divi sites that has just upgraded to WP 6.6 and is exhibiting the underline issue. After installing the plugin, the site reverts back to how it was meant to look, without underlines on links.

I haven't been systematic (sorry) but I don't remember any of my Divi websites that have gone to WP 6.6 so far not showing unwanted underlines. I see it in embedded (in text) links, in Divi button modules and I also see underlines on mobile menu items, at least I do when just using Chrome Inspect to look at them. I haven't seen this last example mentioned elsewhere. The plugin fixes all of these, including the mobile menu underlines.

I manage a lot of Divi websites. The ones that have already gone to WP 6.6, I've 'fixed' by adding CSS myself to set text-decoration:none as appropriate. A better and more general fix would be great, thank you. I really appreciate how quickly this is being looked at.

Last edited 8 weeks ago by clarktbt (previous) (diff)

#29 in reply to: ↑ 28 @hellofromTonya
8 weeks ago

Replying to clarktbt:

I just tried the Gutenberg plugin in one of my Divi sites that has just upgraded to WP 6.6 and is exhibiting the underline issue. After installing the plugin, the site reverts back to how it was meant to look, without underlines on links.

I haven't been systematic (sorry) but I don't remember any of my Divi websites that have gone to WP 6.6 so far not showing unwanted underlines. I see it in embedded (in text) links, in Divi button modules and I also see underlines on mobile menu items, at least I do when just using Chrome Inspect to look at them. I haven't seen this last example mentioned elsewhere. The plugin fixes all of these, including the mobile menu underlines.

Thank you for testing and validating it works on your affected site.

Version 0, edited 8 weeks ago by hellofromTonya (next)

#30 @hellofromTonya
8 weeks ago

  • Priority changed from normal to high

Elevating the priority to high for better tracking, as this issue is one of the drivers for a faster 6.6.1.

#31 @noisysocks
8 weeks ago

  • Owner set to noisysocks
  • Resolution set to fixed
  • Status changed from reopened to closed

In 58749:

Block Themes: Avoid specificity bump for top-level element-only selectors

Prevent issues (e.g. links being underlined) caused by a bump in CSS
specificity for top-level element-only global element styles.

Backports the PHP changes from https://github.com/WordPress/gutenberg/pull/63403.

Fixes #61630.
Fixes #61660.
Props aaronrobertshaw, andrewserong, noisysocks.

#32 @noisysocks
8 weeks ago

  • Keywords dev-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening to request backporting r58749 to the 6.6 branch.

#33 @noisysocks
8 weeks ago

#61630 was marked as a duplicate.

#34 @andrewserong
8 weeks ago

  • Keywords dev-reviewed added; dev-feedback removed

I've reviewed the change in https://core.trac.wordpress.org/changeset/58749, so just marking this as dev-reviewed for commit to the 6.6 branch.

#35 @butterflymedia
8 weeks ago

Will all these :root and :where styles be removed in 6.6.1? That would be great.

#36 @butterflymedia
8 weeks ago

The filter below fixed the entire issue for me:

add_action(
    'wp_head',
    function () {
    	global $wp_styles;

        if ( ! empty( $wp_styles->registered['global-styles']->extra['after'][0] ) ){
    		$wp_styles->registered['global-styles']->extra['after'][0] = str_replace(
                [
                    ':root :where',
                    ':root',
                    ':where',
                ],
                '',
                $wp_styles->registered['global-styles']->extra['after'][0]
            );
        }
    },
    1
);

#37 @hellofromTonya
8 weeks ago

  • Owner changed from noisysocks to hellofromTonya
  • Status changed from reopened to reviewing

[58749] props need adjustment to include everyone who reported and tested the issue. I'll manually adjust its props and then update the list of props when doing the backport commit to the 6.6 branch.

Setting myself for backport review and commit.

#38 @hellofromTonya
8 weeks ago

  • Keywords commit added

Tested [58749] on the 6.6 branch using the same approach previously done in my test report with the Divi theme. Before the changeset, all links are underlined. After the changeset, issue is resolved.

Gathering additional props.
Then will backport to the 6.6 branch.

#39 @hellofromTonya
8 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 58751:

Block Themes: Avoid specificity bump for top-level element-only selectors.

Prevent issues (e.g. links being underlined) caused by a bump in CSS specificity for top-level element-only global element styles.

Ref: PHP changes from https://github.com/WordPress/gutenberg/pull/63403.

Reviewed by hellofromTonya.
Merges [58749] to the 6.6 branch.

Props aaronrobertshaw, andrewserong, noisysocks, annubis, butterflymedia, clarktbt, hellofromTonya, jorbin, joedolson, swissspidy, courane01, raquelandefeld, talldanwp, markhowellsmead, youknowriad, poena, cbirdsong.
Fixes #61630, #61660.

#42 @hellofromTonya
7 weeks ago

  • Keywords fixed-major added
Note: See TracTickets for help on using tickets.