Commit 89aab78
committed
fix(router): derive the router base from the served URL
History mode broke deep links on the /index.php/... URL form. Nextcloud
serves the same app under BOTH /apps/stackiq/... and
/index.php/apps/stackiq/..., but generateUrl() returns only the form the
instance is configured for. Arriving on the other form left the path
outside the router base, vue-router could not resolve it, and the
catch-all redirected to '/' -- the visitor landed on the Dashboard with
no error and the deep link was silently swallowed.
Measured before the fix:
/apps/stackiq/komplianties -> Compliance
/index.php/apps/stackiq/komplianties -> Dashboard <- silently wrong
Hash routing never had this: the route travelled in the fragment, so the
path prefix was irrelevant. This is the one real regression the switch
introduced, and it would have applied to every app in the rollout.
The e2e suite navigates via /index.php/..., which is exactly how it was
caught -- two index specs failed while manual browsing on the pretty URL
looked fine.
Now both forms resolve, with the path preserved.1 parent 5e5631c commit 89aab78
1 file changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
133 | 161 | | |
134 | 162 | | |
135 | 163 | | |
| |||
167 | 195 | | |
168 | 196 | | |
169 | 197 | | |
170 | | - | |
| 198 | + | |
171 | 199 | | |
172 | 200 | | |
173 | 201 | | |
| |||
0 commit comments