Fixed
Project:
Runlight
Version:
0.3.3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2026 at 01:49 UTC
Updated:
10 Nov 2026 at 04:07 UTC
Jump to comment: Most recent
Runlight does not currently work correctly when the Redirect module's “Enforce clean and canonical URLs” option is enabled.
Accessing Runlight returns:
{"error":"Not found","code":"not_found"}
1. Enable the Redirect module.
2. Enable the “Enforce clean and canonical URLs” option, which sets:
route_normalizer_enabled: true
3. Configure Runlight to run inside the Drupal site.
4. Request /runlight/s.js.
Exclude Runlight paths from route normalization by setting the request attribute _disable_route_normalizer for /runlight and its subpaths.
Canonical URL normalization should remain enabled for the rest of the site.
Comments
Comment #2
xmacinfoComment #3
joncphillips commentedThank you for reporting this @xmacinfo! I have a fix I'm testing now and will push a release out shortly.
Comment #4
xmacinfoI am currently using this code in a custom module:
Not yet pushed to production.
Comment #5
joncphillips commentedThanks for the clear report and the suggested fix, that was exactly it.
Runlight sends every path under /runlight to one route whose own path is /runlight. With "Enforce clean and canonical URLs" on, Redirect compared /runlight/s.js with that route's canonical path and redirected it to /runlight, which Runlight answers with "Not found". So it wasn't only the dashboard: the script, its API, and visit counting were all affected on sites with that option on.
The module's path processor now sets _disable_route_normalizer on requests under /runlight, so Redirect leaves those paths alone and keeps normalizing the rest of the site. The fix is in 0.4.1: https://www.drupal.org/project/runlight/releases/0.4.1
It does the same as the code in your custom module, so once you're on 0.4.1 you can remove that. (The module sets it only while Runlight runs inside the Drupal site; when it reports to another Runlight, /runlight is an ordinary path on your site and Redirect normalizes it like any other.)
Thanks again!