Add trailing slash to current_url to fix matching URLs without trailing slash#1785
Conversation
|
This makes sense to me 👍 Every once in awhile I install GlotPress again and get 404s because I forget the slashes. |
|
This PR actually doesn't fix that. |
|
Oh, gotcha! |
…tomatically checked and added a trailing slash
|
As discussed with @amieiro, changed the approach to check for trailing slash in the URL as soon as possible.
With the current approach change, this PR actually solves the issue of 404s :) |
Problem
Navigating to a page like
site.com/glotpress/projectswithout the trailing slash won't identify the current page in the top menu.Solution
Add trailing slash when trying to match menu items to show the current one.
Fixes #1784