This issue has novice tasks. If you are an experienced core developer and have multiple commit mentions, please review novices' work on these tasks rather than doing them yourself. Feedback from experienced contributors is valued.
Problem/Motivation
The following snippet is from template_preprocess_links()
// Add a "data-drupal-link-query" attribute to let the
// drupal.active-link library know the query in a standardized manner.
if (!empty($link['query'])) {
$query = $link['query'];
ksort($query);
$li_attributes['data-drupal-link-query'] = Json::encode($query);
}
Proposed resolution
Missing a use statement for Drupal\Component\Utility\Json
but as we are not getting a fail on testbot it appears we are also missing tests! The Drupal\system\Tests\Theme\FunctionsTest::linksTest()
needs to be improved to catch this.
Remaining tasks
- Write patch (novice)
- Review patch to check it fixes the issue, the change is properly documented and for coding standards. Provide test evidence (novice)
- Keep issue summary up to date (novice)
User interface changes
None.
API changes
None.