Comments on all pages should have anchor links available #44
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Links like this facilitate copy and paste for deep linking.
Currently
<h5 id="comment_xxx">Comment #1 posted on 2024-01-01 11:11:11 by John Doe</h5>
Should be
<h5 id="comment_xxx"><a href="https://hackerpublicradio.org/eps/hpr4109/index.html#comment_xxxx">Comment #1</a> posted on 2024-01-01 11:11:11 by John Doe</h5>
I believe this is a change for hpr_generator?
Created Pull Request 199 to address this issue.
The following PRs were merged, which I think should close this issue
@davmo you had issues with this one.
Can you review and close if necessary.
The problem with making a change from:
to
is that this has an historical effect.
Any historical show that references an historical comment will have used the old format, and this change will have invalidated the link because all comment links have been changed.
I use links to comments in the past month in the notes I generate for the Community News shows each month. I wasn't aware that the formats had changed until I happened to try and follow a comment link, which failed. Admittedly it fails "softly" in that it takes you to the show in question, but it is confusing.
I have adapted the template that generates these monthly notes to use the new format, but ideally we should be going back through the notes to show number 1 making adjustments to comment links.
To be realistic, I expect these will be few, and will be found mainly in Community News notes, but I think we should learn the lesson that future changes like these should be discussed, and their ramifications considered before they are implemented.
I propose closing this issue, but perhaps opening another which defines a retrospective 'fixup' for all comment links.
Sorry about that Dave, I don't specifically remember why I chose to change the naming convention for the comment ids. I obviously didn't think about the fact that they might be manually referenced somewhere else in the site. I think I wanted an ID that would be unique over the site and not just within the page. It would also make it easier to find the comment in the database itself.
I don't think it would too hard to change it back to the original format, but now you are referencing the new style in your latest Community news. We could have the template generate new style and old style based on a date. So any comments in an episode posted after the cut-off date gets the new format, any before get the old style.