fix(subdirectory): prefix-safe data-manager dropzone upload icon#7670
Merged
Conversation
Port of the data-manager part of Countly/countly-platform#428 (the other two plugins it fixes, ai-assistants and config-transfer, are enterprise- only and not in this repo). The dropzone filename icon used a host-root-absolute CSS path (content: url('/data-manager/images/upload-icon.svg')), so on a subdirectory deploy (e.g. /countly) the prefix was dropped and the icon 404'd. Use a relative url("../images/data-manager/upload-icon.svg") (same pattern star-rating uses), which resolves in both layouts: dev: /data-manager/stylesheets/ -> /data-manager/images/data-manager/... prod: bundled /stylesheets/plugins.min.css -> /images/data-manager/... Relative resolution in prod requires the asset under images/<plugin>/, so move images/upload-icon.svg -> images/data-manager/upload-icon.svg. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a subdirectory-deploy asset path issue in the data-manager plugin by replacing a host-root-absolute CSS url('/...') reference with a relative URL and relocating the referenced SVG so it resolves correctly in both dev and bundled production CSS.
Changes:
- Updated
main.scssto reference the upload icon via a relativeurl("../images/data-manager/upload-icon.svg")instead of a host-root-absolute path. - Added/moved the
upload-icon.svgasset underimages/data-manager/to match the resolved production asset layout.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plugins/data-manager/frontend/public/stylesheets/main.scss | Switches the dropzone filename icon to a prefix-safe relative URL so subdirectory deployments don’t 404. |
| plugins/data-manager/frontend/public/images/data-manager/upload-icon.svg | Provides the icon at the new location expected by the updated relative URL in both dev and bundled CSS contexts. |
Cookiezaurs
approved these changes
Jun 5, 2026
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.
Summary
Port of the applicable part of Countly/countly-platform#428. That PR fixes host-root-absolute CSS asset paths in 3 plugins; only
data-managerexists in this repo (ai-assistants and config-transfer are enterprise-only), so this PR covers just that one.The data-manager dropzone filename icon used
content: url('/data-manager/images/upload-icon.svg')— a host-root-absolute path. On a subdirectory deploy (e.g./countly) the prefix is dropped and the icon 404s.Fix
main.scss: use a relativeurl("../images/data-manager/upload-icon.svg")(same pattern star-rating already uses). Resolves in both layouts:/data-manager/stylesheets/→/data-manager/images/data-manager/…/stylesheets/plugins.min.css→/images/data-manager/…images/<plugin>/, so movedimages/upload-icon.svg→images/data-manager/upload-icon.svg(verified it's referenced only by this scss rule — the top-levelsingle-arrow.svg/transform.svgare relative<img>refs and untouched).0 absolute
url("/…")remain in the file; compiled CSS rebuilt by CI.🤖 Generated with Claude Code