fix(linkable-blocks): correct enqueued stylesheet path - #19
Merged
Conversation
Bug fix - Change build/css/style-linkable-blocks.css to build/css/linkable-blocks.css - The "style-" prefix was copy-pasted from another block's enqueue code; this block's actual webpack output has no such prefix - Caused the stylesheet to 404 on every single page load sitewide
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change corrects a verified incorrect asset path to an existing built file and is consistent with the associated .asset.php metadata already used by the style registration.
Pull request overview
This PR fixes a sitewide frontend asset issue in the LightSpeed Site Plugin by correcting the registered/enqueued Linkable Blocks stylesheet path so WordPress loads an existing built CSS file rather than hitting a 404.
Changes:
- Updated the Linkable Blocks style registration to enqueue
build/css/linkable-blocks.css(the file that exists inbuild/). - Added a
[Unreleased] / Fixedchangelog entry describing the 404/MIME-type impact and the corrected path.
File summaries
| File | Description |
|---|---|
inc/linkable-blocks.php |
Fixes the registered stylesheet URL to match the actual compiled CSS asset (build/css/linkable-blocks.css). |
CHANGELOG.md |
Documents the fix under [Unreleased] / Fixed. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
krugazul
approved these changes
Sep 7, 2026
krugazul
left a comment
Contributor
There was a problem hiding this comment.
Ive reviewed this commit, its nice and small only 2 changes thanks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Linkable Blocks stylesheet was 404ing on every single page load sitewide.
inc/linkable-blocks.phpenqueuedbuild/css/style-linkable-blocks.css, a filename that doesn't exist in the build output — the actual compiled file (present, correctly built by webpack, committed to the repo) isbuild/css/linkable-blocks.css, with nostyle-prefix.Two other blocks in this plugin (
back-to-top,button-icon) genuinely do get astyle-prefix from their own webpack entry names, so this enqueue code was almost certainly copy-pasted from one of those and the prefix was never removed forlinkable-blocks.Because this style is registered on
initand enqueued onwp_enqueue_scripts(sitewide, not gated to any template or block), every single frontend page load requested the broken URL, received a 404 HTML error page back instead of CSS, and got blocked by strict MIME-type checking (X-Content-Type-Options: nosniff) — surfacing as network errors and MIME-mismatch console warnings across the consuming site (ls-theme), including on search results and 404 pages.Changes
inc/linkable-blocks.php— corrected the enqueued path frombuild/css/style-linkable-blocks.csstobuild/css/linkable-blocks.cssCHANGELOG.md— added entry under[Unreleased] / FixedFiles Modified
inc/linkable-blocks.php— 1 line changedCHANGELOG.md— +1 lineTesting
node_modules/vendor/.git) that the wrong filename appears in exactly this one place — no other reference needs the same fixbuild/css/linkable-blocks.css) exists on disk and is already correctly built — no rebuild neededcomposer run phplint— no syntax errorsvendor/bin/phpcs --standard=WordPress inc/linkable-blocks.php— the one finding reported (missing EOF newline, line 362) is pre-existing ondevelopand unrelated to this change, confirmed viagit show develop:... | phpcsContent-Type: text/css, and that the related BugHerd network-error/MIME-mismatch tickets clearDeployment Notes
Checklist
php -l/composer run phplintpassedRelated Issues
Related to LS-2935 (LightSpeed) and LS-2940 (console errors likely caused by this bug, in the
ls-themerepo) — not part of this repo's issue tracker.