-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigating to the turbo-root
doesn't use Turbo Drive
#912
Comments
leofeyer
pushed a commit
to contao/contao
that referenced
this issue
Nov 21, 2024
Description ----------- Reverts #7597 until hotwired/turbo#912 is fixed in Turbo. Commits ------- 347c3d3 Revert "Add the `turbo-root` meta tag to the back end (see #7597)"
leofeyer
pushed a commit
to contao/core-bundle
that referenced
this issue
Nov 21, 2024
Description ----------- Reverts #7597 until hotwired/turbo#912 is fixed in Turbo. Commits ------- 347c3d3e Revert "Add the `turbo-root` meta tag to the back end (see #7597)"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you configure a Turbo root as follows:
Turbo Drive will handle navigations to URLs within that root (like
/app/foo
), but not navigations to the root itself (/app
).We can see why this happens by following the logic from the
locationIsVisitable
function:locationIsVisitable
is calledlocation = http://example.com/app
rootLocation = http://example.com/app
isPrefixedBy
, which viagetPrefix
, adds a trailing slash to the root URL:'http://example.com/app' === 'http://example.com/app/' || 'http://example.com/app'.startsWith('http://example.com/app/')
, which is false. No Turbo Drive.The text was updated successfully, but these errors were encountered: