Closed raiph closed 9 months ago
Yes, and it also seems that the anchor doesn't work.
It did use to work on the old site: https://web.archive.org/web/20200921203737/https://docs.raku.org/routine/cmp#(Operators)_infix_cmp
and it pointed to this segment of the site:
This segment is present on the new site as well:
However, its link seems quite broken: https://docs.raku.org/routine/cmp#language/operatorsroutineinfix is what I can copy from the anchor.
I think this is a content generation problem; the name of the entry generated into the site is wrong, not the textual link. @coke could you move this issue to the doc-website repo?
@raiph @2colours I'm having trouble replicating this issue.
I clicked on the link in the first post and arrived at the composite page for cmp
. The page lists five sources, namely 'cmp' in: type/Allomorph, type/List, type/Order, language/operators, and type/Pair.
The 'in context' links in each of those segments are correct and link without error to the relevant sections of the original documentation sources.
Please help me find which link is broken.
@finanalyst it's the type/Order link, that's where @raiph 's snippet is from. And this link itself should scroll to the language/Operator part, the way the archive link does. The problem is that on the new site, the segment of the language/Operator part is #language/operatorsroutineinfix
in the URL, while it used to be #(Operators)_infix_cmp
.
By the way, this is quite potentially a problem with all operators. In the compound sources, their segments are all like #language/operatorsroutineprefix
and #language/operatorsroutineinfix
. Why is that?
@2colors I'll look at this at the weekend. It looks as if a part of the name is missed off in the secondaries plugin, which is where composites are generated. Or in the header template where the internal url is generated. In the old site, sources were parsed twice, once to get composite information then to render. New site composite information is collected at render time. Then all composites are generated after primary sources have been rendered.
On Tue, 28 Nov 2023, 12:29 Márton Polgár, @.***> wrote:
@finanalyst https://github.com/finanalyst it's the type/Order link, that's where @raiph https://github.com/raiph 's snippet is from. And this link itself should scroll to the language/Operator part, the way the archive link does. The problem is that on the new site, the segment of the language/Operator part is #language/operatorsroutineinfix in the URL, while it used to be #(Operators)_infix_cmp.
By the way, this is quite potentially a problem with all operators. In the compound sources, their segments are all like
language/operatorsroutineprefix and #language/operatorsroutineinfix. Why
is that?
— Reply to this email directly, view it on GitHub https://github.com/Raku/doc-website/issues/319#issuecomment-1829747262, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACYZHH6H6A6CYMPEMC4UJ3YGXKL3AVCNFSM6AAAAAA72LM4XSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRZG42DOMRWGI . You are receiving this because you were mentioned.Message ID: @.***>
@raiph @2colours I have looked at this issue again and I think that there may be some differences about how things should work, as opposed to how they used to work. Some comments:
routine/cmp
and is not hitting the target. But that does not seem to be the case here.language/operatorsroutineinfix in the URL, while it used to be #(Operators)_infix_cmp
Please let me know whether the issue here is
If either of the above, please add some suggestions about how to progress this issue
Each title has its own link id, which is automatically generated, and is used in the TOC. This id is different to the automatic id that was generated for the old site.
This is the problem, I would say.
I don't think it's appropriate to chase and change all links in the source because the content generation changed - moreover, I think this should be treated - more or less... - the same way as URL's themselves. Anybody could link to these anchors anywhere, anytime. We cannot change that all. This is a "breaking change" for the site.
@2colours I still can't locate where the error is. As to the wider issue of changing links that break the site, I thought I had been careful enough to eliminate that possibility. Seems there are still problems.
Also, there is the link error report, which is generated each time I renew the site.
I thought many of these problems would be solved by the escape character refactor. However, now that the refactor is in place, adding different links to Composite pages is relatively easy. There are two mapping files for to remap broken links to working links. I'll work on this in the next few days.
@finanalyst
I still can't locate where the error is.
I (@raiph) am not sure if you mean:
You haven't been able to locate any error related to the particular example I began this issue with.
You have, but haven't been able to locate where content generation is going wrong.
You've seen the problem I began this issue with, and have addressed that, but you've been unable to locate some other problem that's been mentioned in this issue discussion after my opening comment.
You've located some other problem that's been mentioned in this issue discussion after my opening comment, but haven't been able to locate the erroneous code in content generation.
I will presume it's #1. If it is, please ignore this comment.
It's #1. I read your first post in this thread. Looked at the links and they all seem correct. @2colors pointed elsewhere, I still can't find the error. But I know there could be errors and I know how to fix them.
So which link on which page
On Thu, 7 Dec 2023, 18:13 raiph, @.***> wrote:
@finanalyst https://github.com/finanalyst
I still can't locate where the error is.
I @.*** https://github.com/raiph) am not sure if you mean:
1.
You haven't been able to locate any error related to the particular example I began this issue with. 2.
You have, but haven't been able to locate where content generation is going wrong. 3.
You've seen the problem I began this issue with, and have addressed that, but you've been unable to locate some other problem that's been mentioned in this issue discussion after my opening comment. 4.
You've located some other problem that's been mentioned in this issue discussion after my opening comment, but haven't been able to locate the erroneous code in content generation.
I will presume it's #1 https://github.com/Raku/doc-website/issues/1. If it is, please ignore this comment.
— Reply to this email directly, view it on GitHub https://github.com/Raku/doc-website/issues/319#issuecomment-1845871741, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACYZHA475OODL4YYYQANTDYIIBK7AVCNFSM6AAAAAA72LM4XSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBVHA3TCNZUGE . You are receiving this because you were mentioned.Message ID: @.***>
@finanalyst We have given the links that don't focus the appropriate part of the site because the #segment identifier is not what it used to be. This is not the same as a big fat 404 error; it's really just that the site should scroll to the appropriate anchors, the way the ToC also works. What else do you need to be able to reproduce it? Or maybe I should rather ask: what do you do and what behavior you get?
@2colours Thank you for your patience. I have now found the link that was causing the problem.
Links within primary sources that point to headngs in Composite pages are hard coded to the id naming system used by the previous web content builder.
This error is picked up in the Error report.
So this is a duplicate of other issues.
If you click on the link in this text:
You will arrive at a page. That page includes that same text.
It also appears in the text shown if you click on the in context link. And if you click on that entry's in context link you arrive back where you started.
I suspect this is likely to be because of an underlying problem that's much more broad than just this one case I've found.
But when I searched issues for things like "link self" etc I failed to find a general issue.