Closed ghost closed 3 years ago
Thanks @cjwillcock
I see the problem - much of the authorization code is ported over from Micropub and I left several conflicts intact. Throughout my testing I must have always had either (mostly both) the IndieAuth plugin or the Micropub plugin active.
I think this should be relatively simple to address. I'll let you know when I push a fix
Just documenting for my own reference: • This error occurs if neither Micropub nor IndieAuth is installed
• If IndieAuth is installed then class-microsub-authorize.php is bypassed altogether
• The auth code in class-microsub-authorize.php is ported from Micropub. This error comes up because I'd renamed the mp_get() function during a during a refactor, which was left dangling incomplete. Easiest solution would be to restore the mp_get() function. A better solution would be to do a proper refactor so there is no potential conflict with Micropub. On paper this should be simple, but so far I've had some trouble. Best to come at it later this week with a clear head
I have an idea to break the authorize class into a library that can be shared between the two plugins and future ones
@dshanske, I'd be keen on that.
I'll try to implement a quick fix in the meantime, still, but given the duplication here a library would be nice.
Made two attempts to refactor, the second of which is in https://github.com/jackjamieson2/yarns-microsub-server/commit/c28a30984ace59d5ba8b91b0c648ca9fa58dbbe1.
Tried logging in to Monocle and got a 403 error. Not sure how to troubleshoot this further without a fairly deep crawl through the code, and I can't really afford that time this week.
I'm tempted to just put up a nag notice that the IndieAuth plugin is required for now.
I installed today via the WordPress dashboard on self-hosted 5.2.2.
Upon first-time activation, if the IndieWeb Micropub plugin is not activated, a PHP fatal error is triggered with:
All subsequent views of the public page or the admin pages trigger the same error.
In the documentation for Yarns, it mentions that the Micropub is optional. It's definitely not optional.