Broken links from v1 to v2 docs & broken redirects Topic is solved
Broken links from v1 to v2 docs & broken redirects
A number of links to v2 docs seem to be broken, when switching from the v1 docs. I get
Example: #warn -> click on v2 in the header -> error message
It links to https://lexikos.github.io/v2/docs/lib/_Warn.htm
Correct link would be https://lexikos.github.io/v2/docs/commands/_Warn.htm
Another example: KeyHistory
links to https://lexikos.github.io/v2/docs/lib/KeyHistory.htm -> error
Correct: https://lexikos.github.io/v2/docs/commands/KeyHistory.htm
There are much more...
On the other hand, coming from v2 seems to work, even then switching back to v2 from v1.
Pages from 'Usage and Syntax' seem to work, though.
Example: #warn -> click on v2 in the header -> error message
It links to https://lexikos.github.io/v2/docs/lib/_Warn.htm
Correct link would be https://lexikos.github.io/v2/docs/commands/_Warn.htm
Another example: KeyHistory
links to https://lexikos.github.io/v2/docs/lib/KeyHistory.htm -> error
Correct: https://lexikos.github.io/v2/docs/commands/KeyHistory.htm
There are much more...
On the other hand, coming from v2 seems to work, even then switching back to v2 from v1.
Pages from 'Usage and Syntax' seem to work, though.
Re: Broken links from v1 to v2 docs.
i'm seeing similar errors:
working: https://www.autohotkey.com/docs/v2/lib/Catch.htm
so i'd guess that the v2 dropdown needs to fix the redirect link
broken: https://lexikos.github.io/v2/docs/lib/Catch.htmhttps://lexikos.github.io/v2/docs/lib/Catch.htm wrote: Error 404
The page you requested doesn't exist here.
AutoHotkey v2 documentation has moved to https://www.autohotkey.com/docs/v2, but if you're seeing this, then either the address is incorrect, or a redirect is missing.
working: https://www.autohotkey.com/docs/v2/lib/Catch.htm
so i'd guess that the v2 dropdown needs to fix the redirect link
Re: Broken links from v1 to v2 docs.
Yes, the error message has changed today, so perhaps someone is working on it?
Re: Broken links from v1 to v2 docs.
"lib" is a recent change and wasn't intended to be pushed to autohotkey.com (but it was done automatically). I wasn't expecting there to be any links to v2/lib so haven't set up any redirects for it (actually, I think any such links were never valid). GitHub Pages doesn't have anything like .htaccess, so each redirect needs to be its own file (unless we do something tricky with the custom 404 page and JavaScript). All of the pages prior to this recent restructuring now redirect to autohotkey.com/docs/v2.
That was done last night (UTC+10) and I finished removing and redirecting the old autohotkey.com/docs this morning (1-2 hours ago).
That was done last night (UTC+10) and I finished removing and redirecting the old autohotkey.com/docs this morning (1-2 hours ago).
-
- Posts: 91
- Joined: 19 Oct 2018, 12:05
Bug on the site when clicking on some pages from search?
there seems to be a bug on the site when searching for a function and trying to click it on the result some return an error page
Re: Bug on the site when clicking on some pages from search?
Yes, eg in Firefox, I get the message that Firefox is not allowed to access the embedded page, and to instead open it in a new tab. In Edge, it fails as well, though less informative.
Might be related to some other changes which caused redirect problems, mentioned by @lexikos.
PS: I will move your post to yesterday's topic about broken docs - in the 'Suggestions on documentation improvements' subforum.
The subforum 'Forum Issues' might have been a good alternative for a report like this, while 'Bug Reports' is usually limited to bugs in the AHK language, not problems on the website, forums or the docs. But no worries... thank you for reporting!
Edit: Also reported here: viewtopic.php?f=3&t=111722
Might be related to some other changes which caused redirect problems, mentioned by @lexikos.
PS: I will move your post to yesterday's topic about broken docs - in the 'Suggestions on documentation improvements' subforum.
The subforum 'Forum Issues' might have been a good alternative for a report like this, while 'Bug Reports' is usually limited to bugs in the AHK language, not problems on the website, forums or the docs. But no worries... thank you for reporting!
Edit: Also reported here: viewtopic.php?f=3&t=111722
-
- Posts: 91
- Joined: 19 Oct 2018, 12:05
Re: Broken links from v1 to v2 docs & broken redirects
yeah, didn't know where to put it, as long as you know about it
you can still reach those pages through the topic navigation but not through the search
you can still reach those pages through the topic navigation but not through the search
Re: Broken links from v1 to v2 docs & broken redirects
It is simply because the search index had not been rebuilt since the recent restructuring. Normally the search index is only rebuilt automatically, when an AutoHotkey release is published.
It has now been rebuilt.
It has now been rebuilt.
Re: Broken links from v1 to v2 docs & broken redirects
That's because the link is not up-to-date. The docs are now split into v1 and v2 branches. Before, the v2 docs were only hosted on github, afaik.
Where did you find this link in the docs? Or is it a personal bookmark?
Where did you find this link in the docs? Or is it a personal bookmark?
Re: Broken links from v1 to v2 docs & broken redirects
Found it in Google. But that's besides the point. The redirect should anyway not happen
Re: Broken links from v1 to v2 docs & broken redirects
I guess, Google will update their index sooner or later. The docs were just restructured... and the v2 branch was added (previously on github).
If I remember correctly, invalid links have already been redirected to Google before. For example, if you applied the docs-tags to an unknown keyword.
If I remember correctly, invalid links have already been redirected to Google before. For example, if you applied the docs-tags to an unknown keyword.
Re: Broken links from v1 to v2 docs & broken redirects
There is absolutely no point redirecting invalid links to Google. If the invalid link cannot be redirected to a correct location, the user should be informed of the link's invalidity.
By the way,
https://www.autohotkey.com/docs/Hotkeys.htm
is correctly being redirected to v1. Why not KeyList?
By the way,
https://www.autohotkey.com/docs/Hotkeys.htm
is correctly being redirected to v1. Why not KeyList?
Re: Broken links from v1 to v2 docs & broken redirects
we have the power to control the redirect of any link on our own domain. we shouldnt be redirecting to google
Re: Broken links from v1 to v2 docs & broken redirects
We have the power, and we are using it to redirect to a search function. Google search is more effective than most others, in my experience.
The redirect to search site:autohotkey.com/docs/ is for docs/whatever-you-want when whatever-you-want isn't in the documentation index.
keyword
The same redirection script strips ".htm" from the URL if present, before searching in the documentation index. I don't clearly recall, but I may have done this because I tend to type URLs like /docs/commands/functionname.htm and sometimes that wasn't working because functionname shared a page with some other function.
The redirection to search only happens if nothing is found in the documentation index. I suppose that it could redirect to the documentation's built-in search function instead.
As for KeyList.htm, the redirect for files in the docs/ root was not working. I was aiming to redirect only when the file exists in /v1, but for now it will redirect any *.htm in root.
The redirect to search site:autohotkey.com/docs/ is for docs/whatever-you-want when whatever-you-want isn't in the documentation index.
Code: Select all
[docs]keyword[/docs]
The same redirection script strips ".htm" from the URL if present, before searching in the documentation index. I don't clearly recall, but I may have done this because I tend to type URLs like /docs/commands/functionname.htm and sometimes that wasn't working because functionname shared a page with some other function.
The redirection to search only happens if nothing is found in the documentation index. I suppose that it could redirect to the documentation's built-in search function instead.
Does this behaviour offend you? Stating your opinion in absolutes like this is not helpful. If anyone finds the search results useful, there is a point, regardless of what you or anyone else personally consider to be correct, or any other reasons for or against.There is absolutely no point redirecting invalid links to Google.
As for KeyList.htm, the redirect for files in the docs/ root was not working. I was aiming to redirect only when the file exists in /v1, but for now it will redirect any *.htm in root.
I have no idea. After reviewing the redirect I had in place more closely, my new understanding is that it should not have worked at all, and I do not see how Hotkey.htm could have been redirected.is correctly being redirected to v1. Why not KeyList?
Re: Broken links from v1 to v2 docs & broken redirects
It does not offend me at all, and I do not think that I said that. I have stated my opinion in absolute because the redirecting behaviour in question seems so absurd to me that I did not consider it probable that it was the intended behaviour. Now that I see that that assumption was incorrect, I am happy to elaborate.Does this behaviour offend you? Stating your opinion in absolutes like this is not helpful.
In the web, redirects are commonly used in order to bring the user to the page that they were heading to even in a situation when the link/url has changed or is otherwise inexistent but can be resolved to the page that was the intended target of the request. Of course, that behaviour is not prescribed by any law, but it is the behaviour that users are expecting based on decades of browsing experience.
Redirecting to Google means that a user is brought to a target that clearly was not the target of the user's request. This happens without the user receiving any kind of feedback or notification that a redirect has happened and why. It is counter-intuitive and confusing. In the worst case, what happens is what happened to me yesterday: You find yourself in Google, and clicking the first search result only brings you back to the same Google page. It took me a while yesterday understanding what was happening and why Google was apparently linking to itself.
I understand that the situation yesterday was probably a temporary phenomenon due to Google's search index not having been updated yet. Nevertheless, abusing redirects for sending the user to a site that they were not trying to go to, is prone to producing unexpected behaviour. It is not good practice.
The better solution would be providing the user with a 404 error page stating that the page does not exist, and on that page offer the user a link to go to Google with their request, if they so wish.
Re: Broken links from v1 to v2 docs & broken redirects
@ThePeter
This is not news to my present self, but I can only guess what I was thinking when I designed the redirect (and I'm not even certain that was me). The point of "regardless of what you or anyone else personally consider to be correct, or any other reasons for or against" was that my comment wasn't about ideal behaviour, but merely the one statement I quoted.
This is not news to my present self, but I can only guess what I was thinking when I designed the redirect (and I'm not even certain that was me). The point of "regardless of what you or anyone else personally consider to be correct, or any other reasons for or against" was that my comment wasn't about ideal behaviour, but merely the one statement I quoted.
Re: Broken links from v1 to v2 docs & broken redirects
Point taken. In future, I will try saying "I see no point" instead of "there is no point".The point of "regardless of what you or anyone else personally consider to be correct, or any other reasons for or against" was that my comment wasn't about ideal behaviour, but merely the one statement I quoted.