JS error (404) when the site is installed under a subdir

Created on 16 June 2022, over 2 years ago
Updated 19 July 2023, over 1 year ago

404 error on get-blocks and get-positioning for opigno dashboard. The directory URL is getting appended twice... ie: /opigno/web/opigno/web/opigno dashboard/get-positioning

This happens when the site is installed under a subdir (e.g. http://example.com/path/to/lms).

Why?

  • All the URL vars created in opigno_dashboard_preprocess_region() are computed using Url::fromRoute()->toString(). The result always adds the base path as prefix.
  • In ng/src/app/app.service.ts the base path is added again (e.g. .get(this.apiBaseUrl + this.getBlocksContentUrl)).
🐛 Bug report
Status

Downport

Version

3.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024