[BUG] Broken linking of tutorial notebooks
Closed this issue · 3 comments
Recreation
- Go to tutorials section
Ctrl + click
a tutorial- Notebook opens in new tab, and current tab relocates to a
404
(eg.https://oceanparcels.org/documentation_stuck
)
Initial thoughts
Clicking a link such as:
oceanparcels_website/index.html
Line 649 in c237308
uses the captureTutorialLink
callback:
oceanparcels_website/index.html
Lines 40 to 52 in c237308
I think the fix is just removing 'hitCallback': function(){document.location = url;}
.
Happy to work on this in the coming week or two when I have time. Feel free to claim if someone else wants to patch this beforehand.
I think that @reint-fischer added this functionality to better track - using Google Analytics - which tutorials were being opened (since they are hosted on a different website). Not sure if that functionality would still work if we remove the hitCallback
call, because I don't know exactly what it does?
Looking deeper into this, I think you're right (removing the hitCallback
call can result in a redirect before the query is hit, hence defeating the purpose). I'm not sure the fix is simple
No longer relevant