-
-
Notifications
You must be signed in to change notification settings - Fork 391
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
Relative URL breaks link on comment timestamp #1368
Comments
Hi @irgendwr, can you please verify if |
Hi @paskal, I can still reproduce this issue with the current version. |
@irgendwr it works by design. you have to include Thank you for the idea. It's a good point and I would change the behavior but probably only in v2 if we go for that. |
Thanks for your response @akellbl4, your assessment is fair. I'll close this issue for now. |
Hi,
in the frontend-config I set the
url
towindow.location.pathname
, so the URL is relative and does not contain the domain.In the embedded comments widget the timestamps have an
href
that is set tourl
+#remark42__comment-<ID>
, which leads to the link pointing tohttps://remark42.<domain>/<path>#remark42__comment-<ID>
(with the remark subdomain => invalid URL) instead ofhttps://<domain>/<path>#remark42__comment-<ID>
(correct URL). The last-comments widget on the other hand supports relative URLs, as it does not use an iframe.Version:
v1.9.0-0521c702-20220124T12:35:27
Steps to Reproduce:
window.location.pathname
An example can be found here: https://iwr.sh/posts/example/#remark42
Workaround:
The only workaround I can see is not using relative URLs, but I would prefer using them since I only want to associate comments with the path and not the domain.
I tried changing the href of the timestamp to only the fragment identifier (
#remark42__comment-<ID>
), but this would also not fix the issue since the link would be relative to the iframe URL, which is also wrong.I'm not sure if there is a simple solution to this, maybe there should be two separate parameters for the URL used for links and the URL associated with the comment.
(similar/possible duplicate of this issue: #1692)
The text was updated successfully, but these errors were encountered: