I check my code with this validator: http://validator.w3.org/check
And throwing this error:

Line 57, Column 105: Attribute hreflang not allowed on element li at this point.
<li hreflang="es" data-drupal-link-system-path ...

This code was generated by block Language switcher.

Seem that the code generate by Drupal does not meet standards.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because we use tags on the li element that are invalid there.
Issue priority Normal because it's not blocking anything.
Unfrozen changes Unfrozen because it only changes markup.
Prioritized changes None
Disruption None
CommentFileSizeAuthor
#118 2454289-118-11.x.patch19.51 KBtimohuisman
#118 2454289-118-10.1.x.patch19.51 KBtimohuisman
#116 2454289-116.patch19.5 KBeugene.brit
#114 D95x_reroll-2454289-114.patch20.5 KBjoseph.olstad
#113 D95x_reroll-2454289-113.patch20.43 KBjoseph.olstad
#109 interdiff_101-109.txt1.92 KBranjith_kumar_k_u
#109 2454289-109.patch22.73 KBranjith_kumar_k_u
#101 D9-2454289-101.patch22.7 KBolivier.br
#99 D9-2454289-99.patch22.82 KBjoseph.olstad
#95 2454289-94.patch22.63 KBalexpott
#95 82-94-interdiff.txt2.45 KBalexpott
#82 2454289-82.patch22.79 KBzviryatko
#82 2454289-80-interdiff.txt866 byteszviryatko
#80 2454289-78.patch22.58 KBZulljin
#77 Screenshot 2019-06-04 at 09.47.33.png152.32 KBMschudders
#75 2454289_75_remove_hreflang_from_li.patch715 bytesMschudders
#72 2454289-63.patch3.29 KBZulljin
#70 2454289-62.patch2.29 KBZulljin
#68 2454289-61.patch3.21 KBZulljin
#60 2454289-60.patch1.95 KBRob Holmes
#58 hreflang_attribute_not-2454289-51.patch10.12 KBShamrockonov
#50 interdiff-2454289-45-50.txt778 bytespguillard
#50 hreflang_attribute_not-2454289-50.patch9.37 KBpguillard
#47 hreflang_attribute_not-2454289-45.patch9.38 KBpguillard
#45 hreflang_attribute_not-2454289-45.patch9.38 KBajzetat
#43 hreflang_attribute_not-2454289-43.patch11.74 KBajzetat
#26 interdiff-2454289-24-26.txt4.89 KBpguillard
#26 attribute_hreflang_not-2454289-26.patch9.43 KBpguillard
#24 attribute_hreflang_not-2454289-24.patch4.88 KBpguillard
#16 attribute_hreflang_not-2454289-16.patch7.35 KBAnonymous (not verified)
#16 attribute_hreflang_not-2454289-16.test-only.patch2.31 KBAnonymous (not verified)
#13 attribute_hreflang_not-2454289-12.patch7.41 KBAnonymous (not verified)
#13 attribute_hreflang_not-2454289-12.test-fail.patch2.31 KBAnonymous (not verified)
#8 attribute_hreflang_not-2454289-8.patch7.41 KBAnonymous (not verified)
#8 attribute_hreflang_not-2454289-8.test-fail.patch2.31 KBAnonymous (not verified)
#8 interdiff-6-8.txt2.53 KBAnonymous (not verified)
#6 attribute_hreflang_not-2454289-6.patch4.87 KBAnonymous (not verified)
#6 attribute_hreflang_not-2454289-6.test-fail.patch2.31 KBAnonymous (not verified)
#6 interdiff-5-6.txt2.56 KBAnonymous (not verified)
#5 attribute_hreflang_not-2454289-5.patch2.31 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rpayanm’s picture

Issue summary: View changes
rpayanm’s picture

Issue summary: View changes
Anonymous’s picture

I don't think the hreflang attribute makes sense on a list element, since it doesn't link to anything and it hasn't got an href attribute.

I notice the hreflang attribute is rendered on the a tag as well, so could we just remove it on the li tag?

nod_’s picture

li element shouldn't have the data-drupal-link-system-path either. Not sure why we want the li to have the active class. It doesn't happen for menus anywhere else.

Anonymous’s picture

Issue summary: View changes
Status: Active » Needs review
Issue tags: +Needs tests
FileSize
2.31 KB

Agreed. So let's remove them all.

I'll write some coverage for this issue, but let's already take a look at what fails.

Added a beta eval to the issue summary.

Anonymous’s picture

This already had test coverage, so I fixed the tests.

The last submitted patch, 5: attribute_hreflang_not-2454289-5.patch, failed testing.

Anonymous’s picture

The last submitted patch, 6: attribute_hreflang_not-2454289-6.test-fail.patch, failed testing.

The last submitted patch, 6: attribute_hreflang_not-2454289-6.patch, failed testing.

rpayanm’s picture

For the record, my base theme is classy.

The last submitted patch, 8: attribute_hreflang_not-2454289-8.test-fail.patch, failed testing.

Anonymous’s picture

The fix removes the attributes in the theme.inc template_preprocess_links() function, and thus is "theme agnostic". I verified this manually.

I did however notice that my patch in #8 wont apply, because I took the diff in a subdirectory. New patches attached, only changing the file paths.

The last submitted patch, 13: attribute_hreflang_not-2454289-12.test-fail.patch, failed testing.

mgifford’s picture

Status: Needs review » Needs work

No longer applies.

Anonymous’s picture

Html::escape() is now used instead of String::checkPlain(). The conflicts were situated here:

CONFLICT (content): Merge conflict in core/modules/system/src/Tests/Theme/FunctionsTest.php
CONFLICT (content): Merge conflict in core/modules/language/src/Tests/LanguageSwitchingTest.php

Anonymous’s picture

Status: Needs review » Needs work

The test only should have failed. We need to find out why it didn't.

The last submitted patch, 16: attribute_hreflang_not-2454289-16.test-only.patch, failed testing.

Anonymous’s picture

Status: Needs work » Needs review

Strange, these are the fails I would have expected. This seems to be a test bot hick-up.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

LaravZ’s picture

Not sure whether this helps in any way, but running the patch now leads to the following error (or, at least, it does for me):

Checking patch core/modules/system/src/Tests/Theme/FunctionsTest.php...
error: while searching for:
    $expected_links .= '<li class="a-link"><a href="' . Url::fromUri('base:a/link')->toString() . '">' . Html::escape('A <link>') .                                              '</a></li>';
    $expected_links .= '<li class="plain-text"><span class="a/class">' . Html::escape('Plain "text"') . '</span></li>';
    $expected_links .= '<li class="html-text"><span class="unescaped">' . Html::escape('potentially unsafe text that <should> be es                                             caped') . '</span></li>';
    $expected_links .= '<li data-drupal-link-system-path="&lt;front&gt;" class="front-page"><a href="' . Url::fromRoute('<front>')-                                             >toString() . '" data-drupal-link-system-path="&lt;front&gt;">' . Html::escape('Front page') . '</a></li>';
    $expected_links .= '<li data-drupal-link-system-path="router_test/test1" class="router-test"><a href="' . \Drupal::urlGenerator                                             ()->generate('router_test.1') . '" data-drupal-link-system-path="router_test/test1">' . Html::escape('Test route') . '</a></li>';
    $query = array('key' => 'value');
    $encoded_query = Html::escape(Json::encode($query));
    $expected_links .= '<li data-drupal-link-query="'.$encoded_query.'" data-drupal-link-system-path="router_test/test1" class="que                                             ry-test"><a href="' . \Drupal::urlGenerator()->generate('router_test.1', $query) . '" data-drupal-link-query="'.$encoded_query.'" d                                             ata-drupal-link-system-path="router_test/test1">' . Html::escape('Query test route') . '</a></li>';
    $expected_links .= '</ul>';
    $expected = $expected_heading . $expected_links;
    $this->assertThemeOutput('links', $variables, $expected);

error: patch failed: core/modules/system/src/Tests/Theme/FunctionsTest.php:279
error: core/modules/system/src/Tests/Theme/FunctionsTest.php: patch does not apply
Anonymous’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll, +DevDaysMilan

Well yes, it tells us we need to reroll the patch :)

pguillard’s picture

Assigned: Unassigned » pguillard
pguillard’s picture

Assigned: pguillard » Unassigned
Status: Needs work » Needs review
FileSize
4.88 KB

Patch rerolled

Status: Needs review » Needs work

The last submitted patch, 24: attribute_hreflang_not-2454289-24.patch, failed testing.

pguillard’s picture

Status: Needs work » Needs review
FileSize
9.43 KB
4.89 KB

Changes to pass tests

LaravZ’s picture

This patch (#26) is working for me. I've no longer got the hreflang attribute within the list element:

<ul class="links"><li class="en"><a href="/en" class="language-link" hreflang="en" data-drupal-link-system-path="&lt;front&gt;">English</a></li></ul>

LaravZ’s picture

Status: Needs review » Reviewed & tested by the community
pguillard’s picture

Cool, we'll soon be able to check on http://validator.w3.org/check without falling ill :-)

LaravZ’s picture

I did validate it with https://validator.w3.org/ (Doctype HTML5(experimental)). Not sure whether we would have to check it any further.

alexpott’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: -Needs reroll

So weirdly this is contradicting there own examples see https://www.w3.org/MarkUp/xhtml2/wiki/XHTML2/i18n/hreflang_examples

Are we sure we haven't discovered a bug in the validator?

pguillard’s picture

Hum, you may be right.
But at first, everyone would think "the W3C must be right"

LaravZ’s picture

Not necessarily, the link describes UL nested in a P, not UL's nested in NAV elements, which is the case in this issue. Though it must be said that W3C also gives an error with the examples presented on the website.

sylus’s picture

The example above is for xhtml not html5. I still think the comment in #2454289-3: Attribute hreflang not allowed on element li at this point holds true as there is no link to anything.

pguillard’s picture

So what do we do now ?

pguillard’s picture

I guess #34 and #3 are right, and it could be also a bug in the validator.
Nonetheless it costs nothing to us to remove this attribute !

LaravZ’s picture

https://validator.w3.org/nu, another w3c tool, returns the same error as http://validator.w3.org/check. Both state that the HTML5 validator is in an experimental stage, so it wouldn't suprise me if #34 and #3 are correct. However, I can't find any issues on the respective github pages pertaining to this hreflang issue.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

pguillard’s picture

Version: 8.2.x-dev » 8.3.x-dev
egouleau’s picture

in fact, Drupal seems to use the attribute hreflang on the "li" to add an "is-active" class on it in the language switcher block (without it, all the "li" in the language switcher are set "is-active")

if only it was named "data-hreflang" instead it would be W3C valid

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

ajzetat’s picture

When I tried to apply this patch, I got the following error message: "Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/attribute_hreflang_not-2454289-26.patch".
So I recreated the patch for the version of Drupal I am using (8.3.7).

Status: Needs review » Needs work

The last submitted patch, hreflang_attribute_not-2454289-43.patch, failed testing. View results

ajzetat’s picture

This is the new patch targeted against 8.5.x-dev.

ajzetat’s picture

This is the new patch targeted against 8.5.x-dev: hreflang_attribute_not-2454289-45.patch. Needs review.

pguillard’s picture

@ajzetat : Something got wrong with your patch updad ?

pguillard’s picture

Status: Needs work » Needs review
borisson_’s picture

Status: Needs review » Needs work

One small nitpick.

+++ b/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php
@@ -93,8 +92,8 @@ protected function doTestLanguageBlockAuthenticated($block_label) {
+      0 => array('langcode_class' => 'en'),
+      1 => array('langcode_class' => 'fr'),

This should use the short notation for arrays ([] instead of array())

pguillard’s picture

Status: Needs review » Needs work

The last submitted patch, 50: hreflang_attribute_not-2454289-50.patch, failed testing. View results

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

TipiT’s picture

#50 applied to core 8.53 and fixed the issue according to https://validator.w3.org/nu/

pguillard’s picture

Status: Needs work » Needs review
Issue tags: -DevDaysMilan +DevDaysLisbon

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Rob Holmes’s picture

This patch applies to 8.5.6 without issues and solves the problem and validation now passes. Would be nice to get this in.

LaravZ’s picture

The patch also applies to 8.6 with proper validation. However, I'm wondering whether we won't be breaking any functionality in the drupal.active-link library. Are we sure this is the way to go?

Shamrockonov’s picture

LaravZ’s picture

Patches should be applicable to 8.7.x now, so I've added a test for that.

Rob Holmes’s picture

Here is an alternative approach that wont affect the drupal.active-link library, (but probably breaks the active link library for all other links where the hreflang was on an actual a tag)

LaravZ’s picture

@Rob Holmes: If I understand correctly, patch #60 replaces the hreflang attribute with a custom HTML5 data attribute. I think there is a rule that states that data attributes should not be used if there is in fact already an existing attribute which is more appropriate for storing the data (language in this case). Hreflang is the more appropriate attribute even if it isn't allowed on a li element. Therefore, while applying this patch might resolve the w3c validation error, it would introduce another non-detectable 'error'.

Rob Holmes’s picture

That's a fair assessment,

Maybe we need a test for the active link library to ensure that nothing gets broken by any changes introduced by removing the hreflang from li elements?

LaravZ’s picture

That might be useful. The LanguageSwitchingTest seems to check some things with the active-link library, so I would say we're at least partway there. I've noticed that the library itself has a redundant variable initializer, but I'm not touching that since it has a big "DO NOT EDIT THIS FILE" warning in it.

Status: Needs review » Needs work

The last submitted patch, 60: 2454289-60.patch, failed testing. View results

LaravZ’s picture

The patch in #58 is functionally the same as the patch in #50, so I have no issues with that. However, issue #2713451 introduced a long comment stating why the 'is-active' class ha been placed on the li element. Apparently, it is needed to allow different styling on an active element. I'll ask the reporter of that issue to take a look at this issue.

joachim’s picture

> Apparently, it is needed to allow different styling on an active element.

That's pretty much the reason the 'is-active' class should be on the LI, and not just the A element. Sometimes you want to apply some sort of highlighting to the whole LI element.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Zulljin’s picture

Status: Needs work » Needs review
FileSize
3.21 KB

Hello, I update this solution, because when we get originalSelectors in this array get all the items, not only li. And as a result we get a bug through which the two elements are placed in the class "is-active".

Status: Needs review » Needs work

The last submitted patch, 68: 2454289-61.patch, failed testing. View results

Zulljin’s picture

Updated patch and fix problem with failing test.

Status: Needs review » Needs work

The last submitted patch, 70: 2454289-62.patch, failed testing. View results

Zulljin’s picture

FileSize
3.29 KB

Fixed issue for not authentication users.

Zulljin’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 72: 2454289-63.patch, failed testing. View results

Mschudders’s picture

I think for the original issue or question the solution is rather simple.
Please do tell me if I am forgetting something but in this patch I just removed the hreflang from the LI element.

Rob Holmes’s picture

@Mschudders while that technically fixes the validation error, it regresses the ability for Drupal.behaviors.activeLinks to highlight which language is the active one (which it does via javascript)

Any solution to this problem will have to provide valid HTML as well as retaining the ability to have a correctly applied .active class.

Mschudders’s picture

Okay but I still see the is-active classes:

Rob Holmes’s picture

From the screenshot you have attached it looks like you have an .is-active class on the NL language as well as the EN Language links?

Zulljin’s picture

@Mschudders, can you apply my patch #63? In this patch I fix bug when hreflang attributes missing in li elements. And ".is-active" sets correctly.

Zulljin’s picture

Status: Needs work » Needs review
FileSize
22.58 KB

Changed the test ActiveLinkResponseFilterTest to validate the results.

Status: Needs review » Needs work

The last submitted patch, 80: 2454289-78.patch, failed testing. View results

borisson_’s picture

Status: Needs work » Needs review

NR for testbot.

zviryatko’s picture

Please credit eugene.brit and ksemihin since they helped Zulljin locally in the office.

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

RTBC.
Patch 82 resolves the related accessibility issue and the test looks correct and corresponds to the changes required for w3c validation.

It also applies cleanly to head of 8.7.x and works correctly for 8.7.x as well.

Thanks

andrewmacpherson’s picture

Re #85 - what's the accessibility issue you refer to? It isn't mentioned anywhere earlier in the issue.

joseph.olstad’s picture

accessibility:
for the language switcher block in particular (our site is two languages English / French)
Language of Parts (Level AA)
1. All English pages: require (lang=”fr”) on Francais language toggle link
2. All French pages: require (lang=”en”) on English language toggle link

andrewmacpherson’s picture

@joseph.olstad - The issue summary here is about a HTML validation error, where <li hreflang="es"> isn't allowed. That has nothing to do with WCAG Language of Parts.

You can't solve Language of Parts with the hreflang attribute. The attribute indicates the language of the linked resource, but WCAG Language of Parts is concerned with the language of the link text. There's a separate issue to address this on the language switcher block - #3049122: Links in language switcher block do not conform to WCAG language-of-parts. I started to look into a solution for that, and noticed the HTML validation error on the containing <li> element, which led me to this issue.

I tried patch #82 with the specimen content in the Umami demo, and the language switcher block:

  • It does solve the HTML validation error from <li hreflang="es">.
  • It leaves the <a hreflang="es"> attribute in place on the link.
  • It doesn't solve the WCAG Language of Parts problem with the language switcher block. Specifically, it doesn't introduce any lang attributes. That's OK, because the issue summary here doesn't claim to fix that.

andrewmacpherson’s picture

andrewmacpherson’s picture

andrewmacpherson’s picture

Crediting eugene.brit and ksemihin per #84

andrewmacpherson’s picture

A couple of things which might need work. I don't know if they're important though, so I'm leaving it at RTBC.

  1. What's going on with the <li data-drupal-link-system-path> attribute? In #4, _nod suggested removing it from the list item. It's still there though. It looks like an earlier patch (#26) removed it, but by patch #82 it's come back.
  2. The new data-drupal-language attribute isn't very well explained.
alexpott’s picture

+++ b/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php
@@ -187,7 +187,10 @@ public static function setLinkActiveClass($html_markup, $current_path, $is_front
-        if ($node->hasAttribute('hreflang') && $node->getAttribute('hreflang') !== $url_language) {
+        if ($node->nodeName !== 'a' && $node->hasAttribute('data-drupal-language') && $node->getAttribute('data-drupal-language') !== $url_language) {
+          $add_active = FALSE;
+        }
+        elseif ($node->nodeName === 'a' && $node->hasAttribute('hreflang') && $node->getAttribute('hreflang') !== $url_language) {
           $add_active = FALSE;
         }

I think we can tidy this up a bit by doing.

        $attribute = $node->nodeName === 'a' ? 'hreflang' : 'data-drupal-language';
        if ($node->hasAttribute($attribute) && $node->getAttribute($attribute) !== $url_language) {
          $add_active = FALSE;
        }

Also #82 had changes to the core/misc/active-link.js that were not build from core/misc/active-link.es6.js so I've fixed that.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Skymen’s picture

#95 not applied for drupal 9.0.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

joseph.olstad’s picture

Here is 95 rerolled for 9.0.x
hope the reroll is ok.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

olivier.br’s picture

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

JayDarnell’s picture

Patch in comment #95 appears to work well for Drupal 8.9.14

joseph.olstad’s picture

needs a reroll for 9.0 and probably 9.1/9.2/9.3

paul_leclerc’s picture

Patch #95 in Drupal 8.9.19 makes my default links language switcher block having no more hreflang tag attributes on the li.
BUT it makes all li having an is-active class.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Alexiane Dapsens’s picture

Patch #101 in Drupal 9.2.5 works fine, no more hreflang tag attributes on the li. And I do have the "is-active" class right on the li containing the displayed language link.

Nelo_Drup’s picture

I just tried patch 101 and 109 and I am getting the following error.

My settings is:
Drupal Version
9.4.5

PHP
Version
7.4.30

Database MySQL
Version
5.7.39

Checking patch core/includes/theme.inc...
error: core/includes/theme.inc: No such file or directory
Checking patch core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php...
error: core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php: No such file or directory
Checking patch core/misc/active-link.es6.js...
error: core/misc/active-link.es6.js: No such file or directory
Checking patch core/misc/active-link.js...
error: core/misc/active-link.js: No such file or directory
Checking patch core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php...
error: core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php: No such file or directory

Note I am testing in a local environment and then upload to a shared server

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mfb’s picture

Patch #109 applies on 9.5.x, but needs a reroll for 10.1.x as core/misc/active-link.es6.js was renamed to core/misc/active-link.js

joseph.olstad’s picture

Rerolled 109:
This new patch works with D9.4.9 and D9.5.0

straight up reroll, I changed nothing except fix conflict rejects on hreflang substitute with data-drupal-language in
core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php

joseph.olstad’s picture

ok the CI framework is really picky, patch 113 is clean for D9.4.9 however it will work for D9.5.0 also

however to please the very picky CI framework that doesn't accept fuzz, I've got another D9.5.0 patch, 114

Status: Needs review » Needs work

The last submitted patch, 114: D95x_reroll-2454289-114.patch, failed testing. View results

eugene.brit’s picture

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

timohuisman’s picture

Re-roll #116 against 10.1.x and 11.x. The custom commands failure from #116 should have been fixed.

The last submitted patch, 118: 2454289-118-10.1.x.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 118: 2454289-118-11.x.patch, failed testing. View results