#wordpress 2018-04-04

2018-04-04 UTC
[kaushal_modi], [jgmac1106], [kevinmarks] and [xavierroy] joined the channel
#
[xavierroy]
Is there an option to post a single post PESOS ? I want to tag a couple of people who are on FB only. But I want a copy of that post on my site too? Is it possible?
#
GWG
It should be, if you do so manually. Not sure if there is an automated option.
j12t, tantek, jeremycherfas, [kevinmarks], jeremych_, GWG-, [joewillmott], dougbeal|mb1, kaushalmodi, ben_thatmustbeme and [miklb] joined the channel
#
[miklb]
a low volume email newsletter run from your own account & WP might not be an issue, but higher volume and people eventually marking it as spam if they forgot they subscribed can cause issues real fast.
#
aaronpk
what does the "invalid post status" error mean?
#
sknebel
my understanding was that it's status like "draft", "published"
#
aaronpk
this keeps happening to people
#
aaronpk
I don't understand why there isn't a simple fix for the plugin for this
#
[miklb]
context?
#
sknebel
has there been no new release yet, or did that not fix it?
#
aaronpk
the micropub plugin returns {"error":"invalid_request","error_description":"Invalid Post Status"}
#
[miklb]
ah, there’s an issue open on the plugin for that, and I think they attempted a fix in the master branch
#
[miklb]
GWG can’t seem to replicate the error and all tests are passing.
j12t joined the channel
#
sknebel
hm, not clear from the issue if that fix has been tested or not by someone with the issue
[snarfed] and [joewillmott] joined the channel
#
GWG
I have tried everything to figure out that error.
[tantek], j12t and [jgmac1106] joined the channel
#
sknebel
did someone confirm to you that the fix didn't help?
#
GWG
I think so in the Issue filing.
#
GWG
The feature has a unit test that keeps passing. I had three people try their installation
#
aaronpk
i'm gonna track this down
#
aaronpk
it's getting too annoying having everyone complain that ownyourgram is broken
#
GWG
aaronpk: The only thing I haven't tried is removing the feature entirely.
kaushalmodi joined the channel
#
GWG
The error message comes if the post status is null.
#
GWG
If neither post-status or visibility is set, it should automatically return the correct one.
#
GWG
I've tried fiddling with it a few times.
#
GWG
I can't figure out a scenario where it would hit a null
#
aaronpk
how do I add rel=me links on wordpress?
#
aaronpk
wait let me figure it out
#
aaronpk
sees "install the indieweb plugin"
#
aaronpk
"This will add several common social media site fields to your "Edit User" page"
#
aaronpk
that wasn't too painful
#
aaronpk
does the wp_remote_retrieve function do its own ssl cert checking?
#
aaronpk
that's unfortunate that it doesn't use my system root CA list
#
aaronpk
I went through all this trouble setting up a local dev environment with an ssl cert that my browser and everything else trusts, but wordpress has its own list apparently
#
aaronpk
so I have to use 'sslverify' => false
#
aaronpk
:sigh:
#
GWG
aaronpk, that drives pfefferle crazy too
tantek joined the channel
#
aaronpk
there are lots of bugs with the current released micropub plugin
#
aaronpk
it can't even create a simple post out of the box
#
[jgmac1106]
I don't use the wordpress mail and instead run it through gmail smtp, I don't run into any rate limits, but I only have a few hundred subscribers
#
GWG
aaronpk, really?
#
GWG
I use it regularly.
#
GWG
What happens when you create a post?
#
aaronpk
I get a server error about a parameter error
#
aaronpk
out of the box there are no syndication targets defined but the code apparently assumes there will always be something
#
aaronpk
it's fixed in master, but gosh
ben_thatmustbeme joined the channel
#
GWG
aaronpk: snarfed just accepted a PR I did that fixed a lot of error notices
#
GWG
But syndication targets are still messed up
#
aaronpk
i'm trying to reproduce this error in the current release
#
aaronpk
so I can't switch to master yet
#
GWG
The code included assumes both sides are a uid where one side is an array
#
GWG
snarfed maintains the plugin, but doesn't actually use it, if I remember correctly.
#
GWG
I use it, but sparingly. I want to up my usage.
j12t joined the channel
#
GWG
aaronpk: I apologize
#
tantek
GWG, do you have tests for releases of the WP Micropub plugin? Or should I ask snarfed? E.g. does it have to pass the entire Micropub server test suite before being released?
#
aaronpk
oh crap what happened, my rel=me links disappeared
#
aaronpk
wtf it was there a minute ago
#
aaronpk
hacks around this problem by adding custom html to the sidebar widget
#
aaronpk
why would the indieweb plugin suddenly not include the rel=me links on my home page?
#
GWG
tantek: I'm not sure if he reruns it before versions. We do rerun the unit tests every time
#
GWG
aaronpk: Suddenly? Not sure. There are two versions of the rel me links.
#
tantek
that is very odd aaronpk, what version of the indieweb plugin are you running?
#
GWG
The hidden ones or the visible ones. The visible ones require you add a widget
#
GWG
The hidden ones should work automatically if you set the configuration.
#
aaronpk
I *just* installed the latest from the plugin store
#
GWG
If not, that's on me.
#
GWG
I wrote that code
#
aaronpk
added pgpkey, logged in successfully
#
aaronpk
then added instagram, now none appear
#
aaronpk
removed instagram, still none appear
#
aaronpk
the other thing that changed between it working and not working is now I have a bunch of posts on my home page
#
GWG
aaronpk: I think I should give the Indieweb plugin some love then.
#
GWG
I use it every dy
#
GWG
Can you try a temporary measure? Add the rel-me widget.
#
aaronpk
I just added custom html for now since this is not the problem i'm trying to track down
#
GWG
If the hidden option isn't working, I will go debug that.
#
GWG
Hmmm, I have a license issue pfefferle held up my last PR on. I totally forgot.
chrisaldrich joined the channel
#
GWG
aaronpk: Will spend some time on it. I have icons to refresh anyway
#
aaronpk
is the micropub_default_post_status setting visible in the UI anywhere?
[miklb] joined the channel
#
[miklb]
if while you’re in there aaronpk and you figure out how to hook into syndication targets tag me 😂
tantek left the channel
#
GWG
[miklb]: I need to fix part of that. I found it the other night. The verification code is wrong.
#
GWG
aaronpk: It is not.
#
GWG
Maybe that should be the next PR I send snarfed, adding a setting UI
#
aaronpk
if the register_setting function isn't run then I get that invalid post status error
#
GWG
It should be running. It is called
#
GWG
Why would it run?
#
Loqi
[andrewgribben] It gets entered into the wp_options table automatically with a blank status type when you save the Writing page. You're right about 'status' I got momentarily confused with post kind when testing, so that makes sense. Point is without the option p...
#
aaronpk
when you save the writing settings, it writes a blank value for micropub_default_post_status to the database
#
GWG
Oh!!
#
Loqi
[aaronpk] > `return get_option( 'micropub_default_post_status', MICROPUB_DRAFT_MODE ? 'draft' : 'publish' );` This doesn't work because the problem is not that `micropub_default_post_status` doesn't exist, it's that it does exist in the database and the val...
#
GWG
aaronpk, I will write the configuration page today
#
aaronpk
that doesn't seem necessary
#
aaronpk
just fix that line
#
aaronpk
this works: return get_option( 'micropub_default_post_status' ) ?: (MICROPUB_DRAFT_MODE ? 'draft' : 'publish');
#
aaronpk
i'm going to install the master branch now and see if it still happens
#
GWG
I did that
#
aaronpk
no you did something slightyl different
#
aaronpk
it'll still fail with what's in the current master
#
aaronpk
because the option *does* exist, it's just blank
#
GWG
Okay, I thought I did that.
#
aaronpk
so get_option still returns ''
#
aaronpk
you did get_option( 'micropub_default_post_status', MICROPUB_DRAFT_MODE ? 'draft' : 'publish' )
#
aaronpk
needs to be get_option( 'micropub_default_post_status' ) ?: (MICROPUB_DRAFT_MODE ? 'draft' : 'publish')
[kevinmarks] joined the channel
#
GWG
I think I will add the settings box anyway.
j12t joined the channel
#
GWG
So, registering the option but not configuring it sets it to blank. Good to know
#
aaronpk
I don't understand why wordpress allows a blank value to be written in the first place but oh well
#
aaronpk
seems like since it knows the default, it should have written that
#
aaronpk
so are you going to add a form picker to choose the default value in the writing page?
#
GWG
aaronpk, this is why I couldn't figure it out. It makes no sense
#
GWG
And yes
#
aaronpk
okay seems like you might also want to add a fallback again just in case get_option ever returns a blank value too
#
aaronpk
how quick can you publish a fix and prepare the next release?
#
aaronpk
i'd really like to get this out to people since it's causing so many problems
tomwolf joined the channel
#
GWG
aaronpk: The fix...this afternoon
#
GWG
Releasing depends on snarfed
#
GWG
He has the final word
#
GWG
But I bet he'd rush it. He hates this bug too
#
GWG
I'm going to fix both
#
aaronpk
looks like there are some other unrelated changes in master but nothing too major
#
aaronpk
okay now on to indieauth
#
GWG
aaronpk++
#
Loqi
aaronpk has 7 karma in this channel (1608 overall)
#
GWG
aaronpk: You'll find a lot of issues there, I know
#
aaronpk
how far have you gotten with the indieauth plugin so far? what am I looking for?
#
aaronpk
it looks like there's a token endpoint but no authorization server yet?
#
GWG
aaronpk: I gave you a branch
#
aaronpk
"token" branch?
#
GWG
Yes
#
aaronpk
looks like it's still linking to indieauth.com as its authorization endpoint
#
GWG
aaronpk: I forgot to change the default.
#
GWG
IT is still defaulting to Indieauth. You can change it under general
#
GWG
To the same as the token endpoint, except /auth
#
aaronpk
oh found a bug
#
aaronpk
is there a PR I can comment on?
#
GWG
Not yet
#
GWG
How about an isue?
#
aaronpk
I guess that'll work
#
GWG
I'll add a PR now
#
aaronpk
I can do inline comments on the code if it's a PR
#
GWG
Opening now
#
Loqi
[dshanske] #20 Add Authorization Endpoint and More
j12t joined the channel
#
aaronpk
those ssl errors jeez
#
aaronpk
I wish there was a better solution
#
GWG
aaronpk: Only ignore what WordPress has for that, which I shy away from
#
GWG
Default already fixed but not yet pushed
#
aaronpk
where are the tokens stored?
#
aaronpk
user meta?
#
aaronpk
looks like it didn't store it for some reason
#
GWG
aaronpk: Yes. As are the codes.
#
GWG
Same basic concept.
#
GWG
They are stored in user meta, with the hashed token or code as the key with the prefix _indieauth_token_ or _indieauth_code_
#
GWG
The hashing and the base64 encoding was what we did in Baltimore
#
aaronpk
ah yea
#
GWG
I just moved the code out of the token endpoint class to reuse it
#
GWG
is hoping that the default issue is the only one but doesn't think so
#
aaronpk
it's not able to find my user account
#
aaronpk
more details in a comment on github
#
GWG
It's a good idea
#
GWG
That search code predates me, but it should fall back
#
GWG
By the way, site/author/username should work
#
GWG
The author post URL
#
aaronpk
I shouldn't have to set my website URL for this to work
#
GWG
It was the only way that snarfed, pfefferle and myself could think of to map a URL to a username.
#
aaronpk
how about if there is only one user, or if the indieweb plugin single-author mode is set, use that user
#
GWG
I was commenting in -dev this week that multi-user sites and Micropub are something that I needed to think of.
#
GWG
aaronpk: That is a good idea I can work with
#
GWG
The single author setting didn't exist originally
#
aaronpk
okay a token is in the database!
#
aaronpk
and it was able to make a post
#
GWG
So, what do you think?
#
aaronpk
this was still from the indieauth.com auth server
#
aaronpk
going to switch to the built in one no
#
GWG
So, the token endpoint is still working, good
[stefp] joined the channel
#
[stefp]
[aaronpk] I just made that change you suggested for the micropub plugin and it works.
#
aaronpk
[stefp]: great!
#
aaronpk
GWG: hm, why am I presented with the wordpress login screen before the authorization UI if i'm already logged in?
#
GWG
aaronpk: By design, oddly.
#
aaronpk
that seems odd
#
aaronpk
if i'm already logged in to wordpress it should jump straight to the authorization screen
#
GWG
Yes
#
[stefp]
Thanks. And thanks to GWG for trying to fix it.
#
GWG
[stefp]: I'm going to fix it permanently.
#
GWG
Thanks to aaronpk for finally figuring out what the problem was
#
GWG
aaronpk: I thought an affirmative reentering of credentials made sense. But...will have a look
#
aaronpk
as long as you show the user the authorization screen you don't need the extra step of having them enter their password
#
GWG
[stefp]: I'll draw up the PR and send it to snarfed for approval and pushing to stable.
#
GWG
aaronpk: How does the authorization screen look?
[jgmac1106] joined the channel
#
[stefp]
Thanks.
#
aaronpk
almost right
#
aaronpk
something is going wrong with the scopes
#
aaronpk
between the wordpress login page and the authorization screen
#
GWG
Oh?
#
GWG
aaronpk: Scopes are pretty much ignored anyway
#
GWG
I haven't figured out how to actually enforce them, which is an issue I need to add to the plugin
[tantek] joined the channel
#
GWG
I'm not sure that is the Indieauth plugin's job though. I think it is the Micropub plugin's job.
#
aaronpk
yes it should be in the micropub plugin
#
aaronpk
it should check what scopes are granted to the token that's being used
#
GWG
Right now, it gives you all permissions for the specific user
#
GWG
As for the scope stripping, urlencode?
#
GWG
Maybe?
#
aaronpk
not sure why spaces would be removed
#
aaronpk
or where this is happening really
#
aaronpk
I don't quite understand all the wordpress redirect-to parameters going on
#
GWG
aaronpk: That took me a week to figure out
#
aaronpk
I can imagine
#
GWG
It's a mess to begin with
#
aaronpk
what does the "login with your domain" checkbox do?
chrisaldrich joined the channel
#
GWG
Authentication
#
GWG
Only useful if you are using a remote server
#
aaronpk
"remote server"? what terminology is that?
#
GWG
Only if you aren't using the built-in Endpoint
#
aaronpk
so if you're using the built-in endpoint then that checkbox shouldn't be visible right?
#
GWG
Agreed
[gerwitz] joined the channel
#
aaronpk
okay turns out there's a lot of things to be discussed about this. would you prefer if I file these as individual issues on your fork of the repo?
#
GWG
You can put it on the PR or on the fork. Your choice
#
GWG
What is your assessment overall?
#
aaronpk
i've been leaving comments on the PR but some of this will take some more discussion
#
aaronpk
this is definitely a good start!
#
aaronpk
I have a stretch goal i'd love to see launched as part of this as well, which i'll describe in an issue
#
GWG
As I said in Baltimore, because this could affect a lot of sites, I feel better having a lot of eyes on it
#
GWG
I am excited to try and refine it
#
GWG
I want to ship this
#
Loqi
[aaronpk] #2 visual updates for the authorization form
#
GWG
I figured I'd work on the visual a bit after I got the thing working.
#
GWG
I will see about the code changes you suggested.
#
GWG
Do you see anything else?
#
[jgmac1106]
https://files.slack.com/files-pri/T03QR2B2T-FA2BRNR8F/indieauth.gif?pub_secret=90d16e4b04&name=indieauth.gif This is what happens to me with indieauth. I know I have an account on my own blog
#
[jgmac1106]
sorry to step into your work with my problem but it has to be the tiniest thing messing me up
#
GWG
That is the old version
#
[jgmac1106]
jgmac1106 goes to update plug ins now
#
aaronpk
okay new issues for you GWG
#
GWG
jgmac1106, interested in self hosted Indieauth?
#
aaronpk
GWG: people installing this plugin shouldn't even be told there is a non-self-hosted version unless they dig reaaaallly hard
#
aaronpk
the default should be that wordpress handles its own indieauth
#
GWG
aaronpk: Once it is finished, that will be the default.
#
GWG
[jgmac1106]: Set the Website URL in your user profile to the URL of the site and it will work.
#
GWG
aaronpk just gave me an idea to fix it
#
GWG
aaronpk: pfefferle designed the login functionality as a temporary measure. Temporary ended up being 3.5 years
#
GWG
I first fixed that functionality, then started working on the self-hosted stuff.
#
GWG
aaronpk: So, if I fix all of those, you think it will be ready to go?
#
GWG
First I have the Micropub thing to do a PR for
#
aaronpk
i'm almost done, still checking out a few more cases
#
aaronpk
what's the expected behavior of multi-user websites with this right now?
#
GWG
aaronpk: I'm not sure. I never tested multi-site.
#
aaronpk
are you pushing off that use case until later? just treating it as a single-user site as far as indieauth clients are concerned?
#
GWG
Probably should
#
aaronpk
you shouldn't not test it, but it's fine to make a decision that it's unsupported
#
GWG
I think miklb uses multisite.
#
GWG
I may ask him
#
aaronpk
full multi-user support would mean returning the author's profile URL as the `me` value returned
#
GWG
aaronpk: Yes. I honestly think the user to url mapping issue could be improved.
#
aaronpk
for now let's get it out the door as a single-user feature. for multi-user sites it just means that everyone logging in to micropub/indieauth apps will appear to be the same user, which is fine
[sdepolo] joined the channel
#
GWG
That's my hope
#
GWG
That's why I didn't worry much about the authorization screen appearance. I just mocked something up quickly.
#
aaronpk
as we know from past experience, things have a tendency to stick around longer than we expect
#
aaronpk
so i'd like to get it right
#
GWG
Considering we started this idea in 2014.
#
GWG
The Indieauth WordPress plugin
#
Loqi
[Aaron Parecki] Allow the user to set a default category for posts created by the application
#
GWG
aaronpk: Wasn't that a anomalily IWS comment?
#
aaronpk
probably
#
aaronpk
she needed it again today
#
GWG
aaronpk: Micropub stores the client_id in the post. It might be easier as a Micropub issue.
#
aaronpk
the UI for that sounds more challenging
#
aaronpk
cause then you need a separate management interface to create that mapping
#
GWG
aaronpk: Good point.
#
GWG
Anyway, I'm writing unit tests for the post status issue.
#
aaronpk
oh? I wasn't sure how to do that since the bug happened when the writing settings were saved. is that something you can tell the test suite to mimic?
#
GWG
aaronpk: I'm writing a test that sets the option to an empty string.
#
GWG
Either way, I'm covering myself three ways
#
GWG
First, I'm writing and submitting the test that checks for an empty string and corrects it.
#
aaronpk
okay i'm done
#
aaronpk
i'm super excited about this though
#
GWG
aaronpk: Me too.
#
GWG
It's a game changer for a lot of people.
#
GWG
And it solves the Indieauth being confused with rel-me-auth for some people.
#
aaronpk
yep it'll be a huge improvement
#
aaronpk
*whew* that took longer than I thought
#
GWG
aaronpk: I'll mention you in the readme
#
Loqi
[dshanske] #117 Add Post Status Configuration Option
tantek joined the channel
[joewillmott] and [chrisaldrich] joined the channel
#
GWG
aaronpk: Knocking these down one by one. The hardest is adding another redirect to get the authorization code.
#
aaronpk
yeah i can imagine
#
aaronpk
i wouldn't even know where to start with that
#
aaronpk
i don't really understand how plugins end up getting run from requests
#
GWG
aaronpk: Figuring out the redirects took me longer than anything else.
[sdepolo] and [kevinmarks] joined the channel
#
sknebel
aaronpk: can you explain what you mean in https://github.com/indieweb/wordpress-indieauth/issues/27 by "the wordpress user is not significant"? why is it more significant in the =code flow?
#
Loqi
[aaronpk] #27 use alternative text for response_type=id
#
aaronpk
when issuing an access token, the wordpress user that the token belongs to is set to the author of the post in wordpress
#
aaronpk
for response_type=id, there is no access token, so nothing needs to be associated with the wordpress user later
#
aaronpk
from the indieauth client's perspective, it gets back a `me` URL of the site's home page, regardless of which wordpress user logged in
#
sknebel
ah, not a profile url. right, saw you mention that earlier and wasn't sure if that's "now" or intended to stay like that for now
#
sknebel
thanks!
#
aaronpk
yeah with multi-user support, the client would get back a profile URL for the specific wordpress user that logged in. but it sounds like that won't be part of v1
[cleverdevil] joined the channel
#
sknebel
yeah, makes sense given how prevalent single-user is
#
aaronpk
yeah and single-user mode is even okay for multi-user sites for many use cases
#
GWG
I need to figure out multiuser
#
GWG
But not today
#
aaronpk
one step at a time :)
#
GWG
I am going to knock all of these issues out tonight
#
aaronpk
that would be amazing
#
GWG
I am on vacation. Coding is better than matzah
#
GWG
But I don't know if I will succeed, but I am going to try.
#
GWG
Already fixed a few.
[jgmac1106] joined the channel