Skip to content

Conversation

@Shubhashish-Chakraborty
Copy link

@Shubhashish-Chakraborty Shubhashish-Chakraborty commented Jan 28, 2026

Summary

In the Music Blocks onboarding walkthrough (TAKE A TOUR window) (step 3/37), the Music Blocks Guide
link returned a 404 error in production.
❌ -> musicblocks.sugarlabs.org/guide/guide.html

Problem

The guide URL was hardcoded differently for local and production environments,
causing the production build to redirect users to a non-existent path.

Fixes #5403

Solution

  • Updated the guide URL to use a relative path (./Docs/guide/index.html)
  • Ensures the guide link works consistently across environments

Watch this screenrecording to experience the fix:

guideLinkFix.mp4

Screenshots

https://musicblocks.sugarlabs.org/Docs/guide/index.html

Image

❌ -> musicblocks.sugarlabs.org/guide/guide.html

Image

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@Shubhashish-Chakraborty Shubhashish-Chakraborty changed the title use relative path for take a tour guide link fix: correct Music Blocks guide link in onboarding walkthrough (TAKE A TOUR) Jan 28, 2026
@Shubhashish-Chakraborty
Copy link
Author

Hii @walterbender
whenever convenient, could you please take a look at this?
The guide link now redirects to the correct path. Please let me know if any further changes are needed.
Thanks!😄

@severe77
Copy link
Contributor

hey @Shubhashish-Chakraborty
for context, even after my PR (#5227) was merged, the production build was still resolving to guide.html, which initially made me think the change hadn’t fully propagated to production or that the old behavior was still being picked up at runtime.

That PR was mainly focused on making the guide link explicit by pointing directly to index.html, instead of relying on directory resolution. This change goes a step further by switching to a relative path, which is a better long-term approach.

Screenshot 2026-01-29 091304 attaching a screenshot for reference, showing that it is still resolving to `guide.html` in production.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@Shubhashish-Chakraborty
Copy link
Author

Hii @severe77
Thanks for the context, that helps clarify it..

The reason production is still resolving to guide.html is likely due to relative path resolution. Since the onboarding code runs from within JS bundles (e.g. /js/...), using ./Docs/guide/index.html can resolve incorrectly in production.

To make this fully robust, I think the safest fix is to use an absolute path from the site root:

if (GUIDEURL === "guide url" || GUIDEURL === "") {
  GUIDEURL = "/Docs/guide/index.html";
}

This avoids environment checks, works consistently in both local and production, and matches the actual deployed structure.

Ive updated the PR with this approach so the guide link works reliably after merge. Let me know if you see any concerns with this.

@Shubhashish-Chakraborty
Copy link
Author

Hiii @walterbender ,
I’ve updated the guide link to use an absolute path (/Docs/guide/index.html) so it resolves correctly in production as well as locally. This should fix the 404 after merge.

Please let me know if you’d like any adjustments or see a better approach.
Thanks!

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.

[Bug]: broken Music Blocks Guide link in onboarding walkthrough (TAKE A TOUR)

2 participants