-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix #14240: Blank link shown in theme actions dropdown #14833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hey! Thanks for this fix! It's amazing!
|
When clicking to open the list dropdown for a theme on the Themes page, blank links are shown at the top and it happens only for themes that are not set as system theme. To fix this, Resources/views/Theme/list.html.twig was updated to prevent empty button definitions from being added to the `customButtons` array. Now, only buttons with proper attributes are merged into the list of actions shown in the dropdown menu. An E2E test is included to verify that no links with `data-toggle="ajax"` are rendered without a `href` attribute.
42456c2
to
61db15b
Compare
Hi @escopecz, just following up — the changes were pushed over the weekend:
Let me know if this aligns with what you had in mind, and I’m happy to adjust if needed. Appreciate your time! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thing is that the CS Fixer is failing. Please run
To fix these issues. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 6.0 #14833 +/- ##
============================================
- Coverage 64.75% 64.74% -0.01%
Complexity 34728 34728
============================================
Files 2275 2275
Lines 103739 103739
============================================
- Hits 67171 67170 -1
- Misses 36568 36569 +1 🚀 New features to boost your workflow:
|
Fixes PHP CS violations flagged during review. No logic or structure changes were made — only style adjustments in accordance with the `.php-cs-fixer.php` config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! The changes looks good, and works as described 👍
@all-contributors please add @pedroasgomes for code |
I've put up a pull request to add @pedroasgomes! 🎉 |
Description
This PR fixes an issue where the dropdown menu for individual non-system themes showed a blank link in the list of available actions. The issue was caused by empty button definitions being passed to the
customButtons
array in the Twig template.To fix this, the
list.html.twig
file was updated to ensure that only properly defined buttons are merged into thecustomButtons
array. Buttons such as the preview or visibility toggles are now conditionally added only when they are not empty, preventing malformed entries from being rendered.An E2E test is included to ensure that no action link with
data-toggle="ajax"
is rendered without a correspondinghref
attribute.📋 Steps to test this PR: