Frank,“Echter, alle bestaande webmentions wil ik dan wel importeren bij de nieuwe dienst zodat ik geen verleden kwijt ben.” Is het niet zo dat verwerkte webmentions onderdeel zijn geworden van jouw site? Je hebt immers statische pagina’s. Mijn site verwerkt de webmentions in mijn database, en als ik morgen e.o.a. externe dienst ga gebruiken verdwijnen die niet. Is dat bij jou niet ook zo? Zoals je zegt verzenden en verwerken zijn verschillende dingen, maar het resultaat van die verwerking is ook weer een verschillend ding. Toch?
Frank,. And fun to be witness to that on the train. But all your postings now also have themselves as a mention in the comments! Do you have an explanation for why that happens? Maybe you need to filter your own post’s url from the list of detected urls you attempt to send a mention to? I have my site set to filter out self-references per post, but not to other postings on my site (so I can ‘mention’ myself and weave a web of connected thought).
At IndieWeb Camp Nürnberg today I worked on changing the way my site displays webmentions. Like I wrote earlier, I would like for all webmentions to have a snippet of the linking article, so you get some context to decide if you want to go to that article or not.
It used to be that way in the past with pingbacks, but my webmentions get shown as “Peter mentioned this on ruk.ca”.
After hunting down where in my site this gets determined, I ended up in a file my Semantic Weblinks plugin, called class-linkbacks-handler.php. In this file I altered “get_comment_type_excerpts” function (which sets the template for a webmention), and the function “comment_text_excerpt”, where that template gets filled. I also altered the max length of webmentions that are shown in their entirety. My solution takes a snippet from the start of the webmention. I will later change it to taking a snippet from around the specific place where it links to my site. But at least I succeeded in changing this, and now know where to do that.
When the next update of this plugin takes place I will need to take care, as then my changes will get overwritten. But that too is less important for now.
The webmentions for this posting are now shown as a snippet from the source, below the sentence that was previously the only thing shown.
So, my webmention issues can’t be solved in the theme, as the content isn’t decided there. I need to dig deeper into the semantic-linkback plugin that I use to handle them.
I found out that webmentions are mentioned in full if they are short enough, and that I can set that limit. So I now want to change the way webmentions are stored. To solve my main issue, I need to select x characters around the spot where my site is mentioned, and set the character limit for webmentions to x+1.
I plan to dedicate some learning time in the coming 12 weeks to better understand the protocols that drive the independent web, or IndieWeb. During our STM18 birthday unconference Frank Meeuwsen presented his experiences on the IndieWeb. Frank, Peter and I have formed an impromptu triade to explore the IndieWeb in the past months. In one of his slides Frank conveniently listed the relevant protocols. I’ll plan for 24 hours to explore 6 protocols. Some of them I already understand better than others, so I’ll start with the ones I feel less knowledgeable about.
The ones I want to explore in more detail, in planned order, are:
- ActivityPub / OStatus, a decentralized networking protocol (as this ties into my Mastodon experiments as well, this comes first)
- Micropub, publish on your own domain with 3rd party tools
- Microsub, own your feed-subscriptions (although I already run my own TinyTinyRss instance)
- Microformats, markup for data, text, people, events (already used on my blog, but curious to see how I can extend that to more types of data)
- Indieauth, federated login protocol to sign in with your own domain on other services (already active on my blog, but interested in where else I could use it)
- Webmentions, respond to a blogpost through your own site (already active on my site, but strongly wish to better format and style it on my site)
I switched the theme of my site to SemPress. It’s a theme that is created to properly support microformats. So I could switch off the Microformats 2 plugin that attempts to do the same as a ‘best effort’ inside other themes. This theme is by the same coder(s) as the plugin. Hopefully this fixes the microformat errors on my side. Next step is looking at the way I display webmentions.
I very much appreciate howto my previous I came across. Some of his responses do make me have new questions.
About the wrong URL, i.e. not the source of the webmention, showing up in a Webmention, Sven writes:
…. There’s a href=”https://news.indieweb.org/nl” class=”u-syndication” as the only top-level link inside his post, and no explicit url property set. This causes the microformats parser to assume that this link points to the canonical location of the post, and it is thus used for comment display. This seems like a problem with the microformats specification, and I’ll follow up on it there, but for now the easy fix would be for Frank’s posts to mark up their permalink, e.g. by adding a class=”u-url” to the link on the headline.
To me this reads as a vulnerability. I would expect my site to always take the source from the webmention message as URL. That is the only one that has been checked from my end for the presence of a reference to my site (the target). If the source page is allowed to set a different URL, even by mistake like here, that feels extremely counterintuitive. It opens it up to spam. In this case the faulty link is to a benign site, but it could have been pills or malware. It is also strange to me that my server in the comments table of the database correctly stores the source url, but in the meta data table stores a url at the discretion of the source’s website. (Meanwhile Frank has fixed it for now on his end as demonstrated byto my previous post, but my point remains)
About no content being shown of the blogpost that links to my blogposts Sven says:
“This is intentional. Frank’s post only mentions your post (=includes a link to it), it is not marked up as an explicit reply. Only replies are shown with content, since for mentions this is often misleading.”
This to me doesn’t make a lot of sense. [update: and for my site at least it isn’t true either, I linked back as an explicit reply to my own posting, but it still shows it as a mention].
There is indeed a difference between a direct reply to something (@Frank….) and mentioning that something as part of something else (As Frank says….). Yet that doesn’t warrant a difference in presentation, where a reply would be shown, yet for a mention just the address of the site. It also gives the source control over how something is shown on my site (by setting a different microformat for a link), while I do not have that control.
From the perspective of the reader of my blog it is not enough to only see that ‘some site links to this blogpost’ to click on that link to find out if it might be of interest, it is tremendously helpful to see a piece of that referring page to determine the context in which it refers to my blogpost.
Most if not all of my mentions of others’ blogposts aren’t meant as a direct response but as building or continuing on a line of reasoning, riffing off other people’s ideas. This is the way distributed conversations take place, how ambient humanity is established. Distributed conversations are a fundamental part of blogging to me. It’s not back and forth replies, it’s a jam session. To enjoy the jam session, you need to see the whole band at a glance, not just a list of the line-up while listening to a sole musician. Discoverability and serendipity flow from it.
It used to be that trackbacks did precisely that, show the context in which someone else referred to my blogposts. It is enriching my own posts to show that context underneath them. See below how that looked a long time ago, in a post on information strategies from 2005.
Three trackbacks on an old post of mine, showing context of the linking blogpost
These three posts are not in response to me, but reflections triggered by my posts and extensions of my contribution
So I’d definitely want to show that context for webmentions. What strikes me as odd now is how little control I have over how the Webmention and Semantic Linkbacks plugins actually deal with webmention data. The stuff I’d like to show is stored in my database, but I can’t through the plugins determine how that is shown.
The same is true on the flipside: my site adds microformats so others can machine read my blog, but apparently it doesn’t do it right. Yet I have no control from the mentioned plugins interfaces over how that is done, nor do I have documentation / insight into how the plugins are designed to comply with microformat specifications. So the next step is: read up on microformat specifications, and dive into the code of the plugins to see where it does what, and whether I can change that in ways that won’t be simply overwritten with the first update of WordPress or the plugins. [UPDATE: I installed a different WordPress Theme, called Sempress, as it should be better at adding the correct microformats for this site]
Webmentions is what makes it possible for me to write here about someone else’s blogpost and have my response show up beneath theirs. And vice versa. Earlier mechanisms such as pingback and trackback did the same thing, but slipped under the radar or succumbed to spam. Webmention is a W3C recommendation.
The webmention itself is simple
The core of webmention is straightforward: if I write something here, my webserver will try to let every site I link to in my text know I link to them. This by checking if the sites I link to have an ‘endpoint’, an antenna basically, for webmentions. If a site does, then it will send a simple message to that antenna stating two web addresses, the source (here my blogpost) and the target (here your blogpost). When your site receives a webmention it will do some checking: does my source blogpost indeed link to your target address?
What happens next is less simple
It can quickly get confusing during what happens next.
When my site receives a webmention (this source x links to your target y), all it knows is just the URL of a page that links to me. What my site displays and how it displays that as a consequence of a webmention message depends on multiple factors:
My server will try to read the source blogpost, and see what machine readable information it contains, and what it can know about the source blogpost. These machine readable parts are in the form of microformats.
My server will store some of the information it finds.
Then my website template will show some information from what the server stored when showing the target blogpost on my site.
How well that works depends on multiple factors therefore:
- The available machine readable info in the source blogpost, and whether that info is properly encoded
- The settings of my server for what it stores
- The settings of my site template for what it shows
When something seems to be going wrong, it could be a problem with your site, my site template or my server settings, and it is never obvious which one it is, or if it is the aggregation of multiple issues. It also depends on how easy it is to alter any settings whether you can repair or change things when webmentions are not properly dealt with. Supposedly the Webmention and Semantic Linkbacks plug-ins I use should take care of those issues but it is not obvious that they indeed do.
An example, me and Frank’s sites webmentioning each other
Frank Meeuwsen and I have been mentioning eachother several times and we’ve seen some strange webmention behaviours. For instance in one case Frank’s blog displayed not just a short part of my posting mentioning him, but my entire page including header, footer and sidebar. Clearly something wrong, likely with some of my machine readable encoding, but maybe also something wrong on his end. I suspect my machine readable encoding is indeed faulty but there’s no clear way in which I can change how my webmention plugins deal with that. And if I alter the code, which I could, it is likely the next software update will simply overwrite it.
Yesterday Frank posted about the puzzle webmention is to him in Dutch. Here are some screenshots on how pieces of that puzzle look on my end of things.
Frank’s posting lives at http://diggingthedigital.com//Waar-te-beginnen-met-Webmentions/ In his posting he refers to a posting on my site. He did not send a webmention. But I can do that myself, using a simple form at the bottom of my posting (visible at the bottom of this page too). In that webform I pasted the mentioned url, and that sends the simple webmention message. That message has been received and stored on my server, with the correct source and target address and a timestamp:
What ended up underneath my posting is:
Or as it looks for me as the site’s owner:
A few things stand out:
- There’s no link to the actual blogpost by Frank (the source), just to his general domain
- There’s a link to news.indieweb.org, which is a completely different domain
- There’s no image of the author or an avatar in absence of an image
- There isn’t any content from Frank’s post shown as part of the mention
So what’s happening? Is this an issue at Frank’s end, is it an issue with what I store on my server, or what I show in my site template? One, two, all three of them?
Puzzling over the pieces in this example
The missing avatar. My site tries to look for an avatar in the source, and if there isn’t one, it shows a general one. Here neither happens, it’s just a blank space. The HTML source of my page reveals it does try to show an avatar, the one that Frank sets in his own blog page as the one to use. His site says in the source code:
<a href="/" class="site-avatar"><img src="/images/dtd-avatar.png" class="u-photo" /></a>
The micro format u-photo is interpreted correctly by my site, and it tries to show the linked image. When you go to that image in your browser it works, but if you try to embed it in your own page it doesn’t.
Frank’s image should be visible below this line,
and above this one, but it isn’t.
Probably Frank’s web server prevents bandwidth theft by sending back a white pixel and not the requested image.
[UPDATE] The issue, as Sven points out in the comments, is that this site is https and Frank’s is http. My browser is set-up to reject http material on an otherwise https site. A case of my browser being my castle.[/UPDATE]
Making the avatar fail because my site doesn’t try to store the avatar locally.
The link to news.indieweb.org and the absence of a link to the actual blog post by Frank. The source (Frank’s blogpost) was sent and received correctly as we saw. In the machine readable part of Frank’s site a value is set as ‘canonical’ address for his blogpost.
There is an extra / in that url, and I’m not sure what that might cause, but on my end the canonical that gets saved is very different, it’s that indieweb address.
The odd bit is that indieweb.org address is not mentioned in the source of Frank’s page. At the same time, it seems it isn’t unique to my server, as underneath a posting about webmentions by Sebastiaan Andeweg you see the same thing happening. Frank’s webmention from May 12th shows the indieweb link (and no avatar). Sebastiaan doesn’t use WordPress or the plugins I use as far as I can tell.
So where’s the actual link to Frank’s blogpost? The canonical URL Frank’s posts provides is stored on my server, in the database table for comments as the URL for the author. The indieweb URL however is stored as canonical URL in the comment metadata table in my database. And that gets used for displaying the webmention underneath my blogposting.
The same is true for the absence of the content of Frank’s mention of me. It is collected and stored in the comment table of my site’s database. Yet what is shown underneath my blogpost as mention is constructed only from the comment meta data table, and not the comment table.
Frank’s mention’s content is in my comment database, yet not shown
The metadata fields stored for Frank’s mention in my database
So what’s happening here is a mix of elements from Frank’s site, my webmention plugins and my site template. But how to influence the behaviour of my plugins without seeing that undone with the next update is not clear to me at this point. Nor is how to alter the plugins so I can improve the machine readable microformats on my site.
Peter’s Drupal site and my WordPress site don’t deal well with pingbacks. His doesn’t reliably send them, mine doesn’t listen as the endpoint (xmlrpc) is blocked by my hoster for security reasons. My site does process Webmentions. I came across Webmention.io, and it has an option to set my pingback ‘antenna’ to their server, which then transmogrifies and forwards it to my site’s webmention endpoint. This way pingbacks are dealt with on my end like webmentions, circumventing the trouble with my xmlrpc. I replaced the pingback url in my website’s section, by hand, which is not a sustainable option and likely only works until the next update of my WordPress theme. However the WordPress documentation is very silent on where in the database or back-end files I could change the pingback url as part of the bloginfo() settings function, and I can’t find it in the WordPress database or files.
I added a statement in the form of
<link rel="pingback" href="https://webmention.io/webmention?forward=https://www.zylstra.org/blog/wp-json/webmention/1.0/endpoint" />
to the file header file in the template from the back-end, not through the WP editor. It sets the pingback url to webmention.io with my own webmention endpoint as a forwarding address.