#wordpress 2017-11-04
2017-11-04 UTC
tantek, [chrisaldrich], [miklb], [jeremycherfas], [kevinmarks] and [eddie] joined the channel
# Loqi GWG: snarfed left you a message 19 hours, 47 minutes ago: just fyi the remaining ones, https://github.com/pfefferle/wordpress-semantic-linkbacks/issues/116 and https://github.com/pfefferle/wordpress-semantic-linkbacks/issues/114 , aren't priorities for me personally right now, so i'm not planning to work on them in the near future
mrhenko joined the channel
# mrhenko GWG: Do you mind if I ask some more questions about webmentions and custom post types here, before posting a GitHub issue?
raretrack joined the channel
# mrhenko Thanks!
# mrhenko I'm trying to create a lightweight way to like posts on the indieweb and I figured that one way to do it would be to create a custom post type called "Likes" that is just a content field in which is type in a link, with class"u-like-of", to the thing I want to send a like to.
# mrhenko Here is my first test post. It's supposed to send a like to one of my own posts: http://blog.henrikcarlsson.se/likes/automatiskt-utkast/
# mrhenko It is in the regular content field. The reason I wanted a custom post type was that it was an easy way (I thought) to get it working without spamming my RSS feeds and syndication flows with the like posts.
# mrhenko It's the first setting under Discussion, right. (My WP is in Swedish, so the options are in Swedish)
# mrhenko Other webmentions work for me. If I make a post and link to someone or something, it works as intended.
# mrhenko But the custom post type just won't work.
[miklb] joined the channel
# mrhenko GWG: Just to make sure I created a regular post with the "like" post kind and a link with class="u-like-of" and that worked.
# mrhenko GWG: So what should I include in a GitHub issue? A link to my post, I assume? The code for my custom post type? Something else?
# mrhenko miklb: Okay, thanks. Just need to tweak my theme a bit first. For some reason it doesn't seem to display the custom post types, even if I look at the URL of one. (I've tested this with another theme as well, so that is not the problem.)
# [miklb] you could even link to the discussion for more reference https://chat.indieweb.org/wordpress/2017-11-04#bottom
# mrhenko GWG: I checked my php_error.log and found some interesting ones from when I tested this: PHP Warning: DOMDocument::loadHTML(): Empty string supplied as input in /Applications/MAMP/htdocs/blog.henrikcarlsson.se/wp-content/plugins/webmention/includes/functions.php on line 166
# mrhenko PHP Fatal error: Maximum execution time of 30 seconds exceeded in /Applications/MAMP/htdocs/blog.henrikcarlsson.se/wp-content/plugins/webmention/includes/functions.php on line 161
# mrhenko Am I right if I assume that the empty string is where my actual content should be?
# mrhenko When I look into webmention/includes/function.php it appears to be in webmention_discover_endpoint()
# mrhenko Hmmm, that could mean that the problem is the site that I'm trying to send a like to which is my live-site. And that site have been known to be slow. Hang on while I try something…
# mrhenko I tried to like a post on my dev site, from my dev site but it still didn't work. No new error messages either.
# mrhenko I am going to sit down with this for a while now and be very methodical. I'll get back to you soon.
[miklb] joined the channel
# mrhenko The plot thickens… I'm currently testing things on my local dev version and I've disabled all plugins except the indieweb ones and I've switched to the 2017 theme and webmentions seem to work.
# mrhenko Nope
# Loqi It looks like we don't have a page for "disabled plugins" yet. Would you like to create it?
# mrhenko I have a hunch that I'm about to test. I'm working through them methodically.
# mrhenko The culprit might be my homemade Twitter POSSE plugin, but I don't know for sure yet.
# mrhenko :)
# GWG [miklb]: If you have WP_DEBUG enabled, try /?pkdebug=form
# mrhenko So this is interesting. I'm making a post with my custom post type. Its content is just a link with "u-like-of" as the class. The innerHTML is a heart and the name of the post I like. When I post it, nothing happens. I've now waited for ten minutes to make sure that it isn't just some latency in the system.
# mrhenko Then I make a new post and that somehow triggers the webmention to be sent and arrives.
# mrhenko Indeed. But for some reason it's triggered on a new post.
# mrhenko Strange.
# mrhenko This is with a few plugins enabled. I'll try and disable some again.
# mrhenko Now I've disabled them all and sent a like. I will now wait for a few minutes.
# mrhenko Nothing happened. I created a new post and then the webmention was sent and recieved.
# mrhenko Very good. But I wonder why it isn't sent until I create a new post.
# mrhenko Correct
# mrhenko I'm testing the same thing now, but using the 2017 theme to make sure the problem is not in my own theme.
# mrhenko Same behavior with 2017.
# mrhenko Every non indieweb plugin
# mrhenko And it gets weirder.
# mrhenko I've now been able to confirm that Likes from my dev site to other posts on my dev site all behave like this, regardless of themes and plugins. So I wanted to see what happened if I tried to like a post, FROM my dev site TO my live site. No webmention arrive at the live site.
# mrhenko So I posted a new post on the dev site. Nothing happened. Posted another post on the dev site. Nothing happened.
# mrhenko Posted a new post __on the live site__ and an older test webmention from the dev site to the live site actually arrived at the live site, timestamped two hours ago. (Which probably correspons fairly well to when it was sent.)
# mrhenko Wait sorry, I spoke too soon.
# mrhenko What arrived was an old test Like from to live site, to the live site.
# mrhenko So the behaviour for Likes where I like something on the same WP installation as the like is consistent. It won't be sent (or arrive) until I post another regular post.
# mrhenko Yeah, probably. But I don't get why it would behave different for regular posts and for a custom post type. And also seems weird that it only works for "internal" webmentions. My test to send from my dev site to my live site still hasn't shown up on the live site.
# mrhenko I think I'll need to leave this for now and go to bed. I'll get back to it tomorrow or on monday and then I'll leave a proper bug report on GitHub.
# mrhenko Yeah, sort of. But why would it then fire when a new post is created and for some reason pick up and "old" post. There seems to be some kind of queue somewhere that doesn't empty itself properly.
# mrhenko Does it queue things up before sending?
# mrhenko How?
# mrhenko Thank you for your time tonight. I'll need to go to bed now before my eyes fall down.
tantek joined the channel