Closed lostfocus closed 6 years ago
MICROPUB_LOCAL_AUTH
isn't set and I don't have the IndieAuth plugin installed, so Micropub_Authorize
should be used, right? Since neither MICROPUB_AUTHENTICATION_ENDPOINT
nor MICROPUB_TOKEN_ENDPOINT
are set I expected to see the same IndieAuth headers as before. They appear to be missing from both the http headers and the html head. The micropub endpoint is in there.
From what I gather from some basic debugging includes/class-micropub-authorize.php
is being included, Micropub_Authorize::init()
is never called, though. 🤔
I tested that before I deployed. Odd. If I somehow reverted a load, I will release a version 2.0.1 quickly
Yes it is
So it can't be that, but lets figure out what it is
Do you want to install the Indieauth plugin in the interim or you prefer Indieauth.com for your authentication needs?
Yeah, I've seen that it is called in the code. I debugged in the most basic way ever: I put a die()
in the init
function and the page still loads fine. I'll do some further research, with https://wordpress.org/plugins/query-monitor/ I couldn't see the actions added in init
where they were supposed to be. Until then I'll just add the indieauth headers by hand.
A-ha!
add_action( 'plugins_loaded', array( 'Micropub_Authorize', 'init' ) );
in class-micropub-authorize.php
has priority 10, but that file only gets included when load_micropub_auth()
is called - which happens with priority 20. This way Micropub_Authorize::init()
is actually only added to the actions array after all the priority 10 actions are called and therefore never gets executed.
Pull request coming in 10 minutes. :)
woo! i was actually hitting this too, and just hadn't found time to debug it. (i similarly don't use the IndieAuth plugin.) thank you for fixing it @lostfocus!!!
Still mystified about why I didn't hit this problem when I tested it. I tried it with IndieAuth disabled. But, I'm heading to IWC Berlin, I'll see about creating and pushing a release as soon as I can.
¯\_(ツ)_/¯ Happens. Enjoy IWC Berlin - I was thinking about going but I have a family thing this weekend.
Wonder if this relates to the post kinda issues with firing order?
@miklb Which one in particular? Firing order has been an issue in the past. If you remember, the original Micropub auth problem you had was a firing order issue.
Yes, firing order. My last test post kinds was still not working right with micropub, thought that’s been over week since I last test
Ever since I've updated the plugin I couldn't use MicroPub anymore - since I was busy with stuff, I only could start looking at the problem today and I noticed that ever since the update the IndieAuth headers seem to be gone, which is not really ideal.
I haven't quite followed along with the development for version 2.0.0 so I can't really tell what's going on, except for that it doesn't work, which is a bit of a bummer.