Skip to content
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

Can’t find the link in the source document, after already detecting it and showing a button #20

Open
Zegnat opened this issue Aug 20, 2017 · 3 comments

Comments

@Zegnat
Copy link

Zegnat commented Aug 20, 2017

I was trying to send a Webmention from https://licit.li/59997fedcc6ab to https://stream.jeremycherfas.net/2017/ive-been-thinking-about-robs-post-and-your-notes-on. It correctly detects the link, but when I click the “Send Webmention” button it ends up in an endless spinner and the following is returned from https://telegraph.p3k.io/webmention:

{"error":"no_link_found","error_description":"The source document does not have a link to the target URL or domain"}

I would expect the spinner to stop and show an error when Telegraph returns an error to the request, telling me as user that something went wrong.

Though I would also expect it to send this mention as it was able to detect the link prior to me clicking the button.

@aaronpk
Copy link
Owner

aaronpk commented Aug 23, 2017

This is actually a different bug, but interesting. Technically your page does not have a link to Jeremy's page, since your source HTML contains

<data class="u-in-reply-to" value="https://stream.jeremycherfas.net/2017/ive-been-thinking-about-robs-post-and-your-notes-on">

Data elements are not web links, so Telegraph's error message is correct.

However when the Microformats parser parses the page it sees the in-reply-to URL as a valid URL.

So the actual bug with Telegraph is that link should never have been included as an option to send to in the first place.

@Zegnat
Copy link
Author

Zegnat commented Aug 23, 2017

Upon reading the Webmention spec again, specifically verification, I agree that my implementation might be wrong. I think Telegraph shouldn’t be using the mf2 parser at all if it only implements Webmention.

Though I think the “other similar links” in “look for <a href="*">, <img href="*">, <video src="*"> and other similar links” might be interpreted as links provided through microformats. The spec links to the HTML5 spec, but the only “links” I can find there is in 4.8:

Links are a conceptual construct, created by a, area, and link elements, […]

So the video and img elements as mentioned in the Webmention spec aren’t considered “links” in HTML5 at all. This makes for a very vague subset of what elements should and should not be supported.

(This might need to be moved to an issue on the Webmention spec.)

@aaronpk
Copy link
Owner

aaronpk commented Aug 23, 2017

So turns out the method that finds that initial list of links is in the mention-client-php library. I've filed an issue there accordingly: indieweb/mention-client-php#33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants