fix: include admin_basepath in absolute navigation paths#368
fix: include admin_basepath in absolute navigation paths#368cameronapak wants to merge 1 commit intorelease/0.21from
Conversation
Fixes navigate(..., { absolute: true }) only prepending basepath but
missing admin_basepath, causing links like /data instead of /admin/data.
Adds admin_basepath to BkndAdminConfig type.
Amp-Thread-ID: https://ampcode.com/threads/T-019cfd9f-89ca-703c-a86c-99eef60e3fe8
Co-authored-by: Amp <amp@ampcode.com>
a4b5031 to
9628720
Compare
|
I noticed there is an error thrown when building bknd because of this. |
|
@jonaspm just tested the build and it runs fine, which error are you seeing? @cameronapak is this fix relevant to the dev command (or when using as static files) or when used inside a framework? |
|
@cameronapak what problem are you solving exactly? I couldn't reproduce the issue. I've tried running it with |
|
@dswbx my bad, not an error but a type warning... huh I am unable to reproduce it on the |
|
It is a good sign indeed 😃 |
I can see you have some confusion and I hope to help clear things up. Watch this video of me replicating this big in CleanShot.2026-03-28.at.05.50.00.mp4I'm also unfortunately running into this bug again with Admin UI routes not retaining the admin basepath: CleanShot.2026-03-28.at.05.52.31.mp4 |
|
@dswbx wild type error appeared: |
|
Yeah noticed that one too, fixed that in the upstream release/0.21 branch |
Does that mean this PR can/should be closed? If so, please do close it |

Continuation of #218
Problem
`useNavigate` with `{ absolute: true }` only prepended `basepath` but not `admin_basepath` when constructing URLs. This caused links like the Data/Schema segmented control to navigate to `/data` instead of `/admin/data` when `admin_basepath` is set.
Replicate
Visit
/admin/data/schemaand then click on Data on the segmented button. It would take the user to/datainstead of/{admin_basepath}/dataChanges