Problem/Motivation
The Copy link menu item in the Social media menu carries an inline hx-on-click handler. Drupal core 11.4.10 strips hx* and on* attributes from rendered links, so the item renders without it and does nothing.
The functional test for the footer looks for a[hx-on-click], so "Footer is missing the copy page link control" fails 28 scenarios on every 1.0.x merge request, for example pipeline 1003253 on !84.
Steps to reproduce
- Install The Rightup on Drupal core 11.4.10.
- Click the chain link icon in the footer. Nothing is copied.
- Run
tests/features/01-website-base-requirements/01-06-front-end-pages.feature.
Proposed resolution
- The menu link keeps
role: buttonand gains acopy-linkclass instead of the inline handler. Classes are kept by core. - The HTMX handler (
hx-on:click) is added by the theme template to the link with that class: #3631079. - The footer step checks
a.copy-link[hx-on\:click]. hx-onuses eval, so a strict Content Security Policy needs'unsafe-eval'inscript-src.
An existing site keeps its old menu link, because default content is not imported again. Update it once with:
drush php:eval '$l = \Drupal::service("entity.repository")->loadEntityByUuid("menu_link_content", "870f0549-cf5e-5a90-ac55-d68d3318fd19"); $o = $l->link->first()->options; unset($o["attributes"]["hx-on-click"]); $o["attributes"]["class"] = array_values(array_unique(array_merge((array) $o["attributes"]["class"], ["copy-link"]))); $l->link->first()->options = $o; $l->save();'
drush cr
No update hook: a recipe has none, and the change is one menu link.
Remaining tasks
- ✅ File an issue
- ✅ Addition/Change/Update/Fix
- ✅ Testing to ensure no regression
- ✅ Automated unit/functional testing coverage
- ➖ Developer Documentation support
- ➖ User Guide Documentation support
- ➖ UX/UI designer responsibilities
- ❌ Accessibility and Readability
- ❌ Reviewed by a human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ❌ Review with the product owner
- ❌ Update Release Notes
- ❌ Release
User interface changes
- The footer Copy link copies the page address again, with the theme change.
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- The footer Copy link works on Drupal core 11.4.10 and later. Existing sites update the menu link once (see the issue).
AI-Generated: Yes. Drafted with Claude Code and reviewed before posting.
Issue fork rightup-3631078
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rajab natshahComment #5
rajab natshah✅ Released rightup-1.0.6