Skip to content

fix(subdirectory): prefix-safe data-manager dropzone upload icon#7670

Merged
ar2rsawseen merged 1 commit into
masterfrom
fix/subpath-data-manager-upload-icon
Jun 5, 2026
Merged

fix(subdirectory): prefix-safe data-manager dropzone upload icon#7670
ar2rsawseen merged 1 commit into
masterfrom
fix/subpath-data-manager-upload-icon

Conversation

@ar2rsawseen
Copy link
Copy Markdown
Member

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-manager exists 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 relative url("../images/data-manager/upload-icon.svg") (same pattern star-rating already uses). 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 moved images/upload-icon.svgimages/data-manager/upload-icon.svg (verified it's referenced only by this scss rule — the top-level single-arrow.svg/transform.svg are relative <img> refs and untouched).

0 absolute url("/…") remain in the file; compiled CSS rebuilt by CI.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 5, 2026 12:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.scss to reference the upload icon via a relative url("../images/data-manager/upload-icon.svg") instead of a host-root-absolute path.
  • Added/moved the upload-icon.svg asset under images/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.

@ar2rsawseen ar2rsawseen merged commit 163389c into master Jun 5, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants