openlayers / openlayers/openlayers

Examples don't display correctly OOTB in a web browser

Open
#15,912 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
12.6k
Forks
3.2k
Avg merge
2d 17h
Merged PRs (30d)
21

Description

Describe the bug
Most href missing '.'
It shows up in the first line but not the second line
link rel="stylesheet" type="text/css" href="./theme/ol.css"
link rel="stylesheet" type="text/css" href="/theme/site.css"

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://github.com/openlayers/openlayers/releases/download/v9.2.4/v9.2.4-site.zip' to download and extract
  2. Open '...../Downloads/v9.2.4-site/en/latest/examples/attributions.html'
  3. See error Failed to load resource: net::ERR_FILE_NOT_FOUND /C:/theme/img/logo-dark.svg:1 (DevTools Console)

Expected behavior
Consistent code that works OOTB. Resolve by replacing all '"/' with '"./'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Extract the v9.2.4-site.zip release and open en/latest/examples/attributions.html in a browser, then inspect the generated example resources and their hrefs. Check the other example pages for the same path pattern; done means the downloaded site loads its styles and images correctly when opened directly from the filesystem.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.