#dev 2025-01-29

2025-01-29 UTC
#
btrem
Ok, I searched the repo for "uncaught". Nothing found. So I assume this is outside of the codebase.
#
aaronpk
it means the slim framework is throwing that exception and needs to be caught by this app somewhere
jbrr joined the channel
#
gRegor
A `middleware.php` file with that Not Found handler, required after controllers.php is in `/public/index.php` would probably do it, just at a quick glance
#
gRegor
Don't need the vendor/autoload from that example snippet, that's already required further up in that index.php
#
gRegor
Actually, require it after `AppFactory::create()`. I think middleware should be before the routes are defined, which static.php and those others do.
#
aaronpk
looks like it's using slim 4 now, quite a while ago
#
aaronpk
i'm so tired of frameworks
#
gRegor
I find this to be the least painful one so far, but yeah, still tiring :/
#
aaronpk
i'm still making plans to consolidate a bunch of my tools (webmention.io, telegraph, quill, etc) into a single platform (probably based on laravel), then at least i'll have only one thing to update
#
aaronpk
oh and indieauth.com is included in that
#
aaronpk
then i can't wait to shut it all down
#
gRegor
I had a passing thought on the lack of other services like indielogin and wondered about setting one up, but quickly brought myself back down to earth XD
#
gRegor
That siren song of ~ooh a *new* project~
#
gRegor
That will be rad, though, having all those in one
#
gRegor
MyIndieauthMentionGraphQuill? dot com
#
btrem
I'm afraid I'm a bit lost here. I've never done anything that complex in php -- and haven't done anything in php in a few years I think. Still, I'm working on a PR. I'll have to figure out how to test what I've done.
jbrr joined the channel
#
carrvo[d]
That is why top-level try-catch is nice! Then you can at least log any errors you never considered.
#
carrvo[d]
On a different note I just fixed a bunch of bugs in my MIndie (transposed from the prod system and pushed to the repo).
#
carrvo[d]
Yippee
#
btrem
I need a bit of hand holding. I forked the news.indiweb repo, created a branch, made changes. Figured out how to start the dev server, but it's missing files. I think I need to do the PHP equivalent of npm install, which is...?
#
[schmarty]
composer install
#
btrem
Same as node?
#
btrem
Ah yes. That seems to do the trick. It /has/ been a while. Thanks [schmarty]++
#
Loqi
[schmarty] has 9 karma in this channel over the last year (31 in all channels)
#
btrem
Getting errors running composer. I created a PR to fix one of the problems I'm having, but as I'm a PHP novice, it needs review. Link to PR: https://github.com/aaronpk/IndieNews/pull/66
#
aaronpk
thanks, that should be right
#
aaronpk
it's clearly been a while since i've updated this project
#
btrem
Merge with care. I'm a bit out of my element. ;-)
#
aaronpk
too late
alephalpha0 joined the channel
#
gRegor
fix it in prod :D
#
aaronpk
these days a surprising amount of my coding is coding in production πŸ™ˆ
#
aaronpk
which may speak to how little coding i have been doing lately more than anything else
#
btrem
Well, I added the u-syndication link to my post and resubmitted. Still not working. Screw it. I'm done messing around with this thing. :/
#
btrem
Can't get composer to play nicely, either. I need to enable something or other in php. I pushed a branch to fix the 500/404 problem, but have not done a PR because I haven't tested the new middleware thing. Maybe I'll dive in to that tomorrow.
grufwub and lockywolf joined the channel
#
carrvo[d]
aaronpk, btrem looks like there was an error deploying the PR, see #indieweb-meta
btrem joined the channel
#
btrem
carrvo[d] dang. Yep. Looks like aaronpk will have to fix it in production. ;-) Sorry 'bout the mess up. btrem--
#
Loqi
btrem: You can't karma yourself!
#
btrem
Hahaha
#
Loqi
rofl
#
btrem
Me too!
#
btrem
Well someone else will have to dock me a karma point.
#
btrem
1 point from Gryffendor!
#
btrem
Or Ravenclaw. I dunno.
#
[Joe_Crawford]
My guess would be the need to go composer update to make sure composer and the lock are in sync but that’s a pure guess.
jbrr joined the channel
#
carrvo[d]
btrem-- if you really want...
#
Loqi
btrem has 0 karma in this channel over the last year (6 in all channels)
jbrr joined the channel
#
[tantek]
awww. the PR looked good to me! btrem++
#
Loqi
btrem has 1 karma in this channel over the last year (7 in all channels)
#
capjamesg[d]
I'm thinking of implementing something like https://support.discord.com/hc/en-us/articles/360039213771-QR-Code-Login-FAQ for my web reader.
#
vinceaggrippino
capjamesg I'm reminded of SQRL (Secure, Quick, Reliable Login) which was created by an old-school assembly language programmer who also hosts a security podcast: https://www.grc.com/sqrl/sqrl.htm
[Murray] joined the channel
#
doesnm
capjamesg[d]: how?
#
capjamesg[d]
That is a very good question! I'd show a QR code on the sign in page that, when scanned, takes you to a special page that sends a message back to the server to say that a device can be authenticated.
#
capjamesg[d]
aaronpk I'm curious if you have read anything about securing QR code authentication.
#
doesnm
IndieAuth QR hmm
jbrr joined the channel
#
sebbu
the only places i've seen qr login are website which also have a mobile app
#
sebbu
... and wifi qr codes :)
#
doesnm
IndiePass
#
doesnm
or micro.blog
#
doesnm
they don't hs
#
doesnm
*they don't have,but they can
ttybitnik and Guest6 joined the channel
#
jeremycherfas
I've come up against an odd problem of accessibility. In my newsletter, there is a box styled with black text on a pale yellow (#ffffdc) background. Someone who views this in dark mode on iOS pointed out that it preserves the yellow background but sets the text to white, making it illegible. I've tried to find advice on dark mode but it all seems to address developers and apps. Anyone point me to a resource that will help me
#
jeremycherfas
specifiy styling that will work equally well in light and dark modes?
nemonical joined the channel
#
[Joe_Crawford]
If the dark text of that background was default, that is, inherited from the user agent stylesheet, then dark mode would make that text light. If you specifically set the text in the light yellow area by defining color, then you won’t have that problem.
#
[KevinMarks]
If your newsletter is going to be read on the retro Windows mail html renderer as well as in gmail and iOS you may want to explicitly define all colours, as CSS techniques for choosing colours by calculation will fail in the older environments (or define colour more than once so when the new syntax is ignored it falls back to an earlier explicit colour). This sounds like a fun Front End Study Hall exercise.
#
jeremycherfas
When is fresh
#
Loqi
Front End Study Hall #020 in 1 days https://events.indieweb.org/PJGxETOMne1b
#
jeremycherfas
Oooh. That's tomorrow! Maybe I'll investigate before thend and see if I can come up with something.
#
jeremycherfas
I currently have <div style="background-color: #ffffdc; padding: .5em 1em .5em 1em"> Are you saying, [Joe_Crawford] , that I need to specify text-color as well?
#
[Joe_Crawford]
Yes, for that block, add `color:black` in the style attribute (or whatever color value you like)
#
[tantek]
aaronpk ^ s/1 days/1 day/ πŸ˜‚ classic amount string problems
#
[Joe_Crawford]
I surely hope you can come to FrESH [jeremycherfas]!
#
jeremycherfas
I'll try. It can interfere with eating, especially if I have to cook.
#
aaronpk
so much for AI
#
aaronpk
when is fresh?
#
Loqi
Front End Study Hall #020 in 1 day https://events.indieweb.org/PJGxETOMne1b
#
jeremycherfas
Pretty strange. I defined color: #111 and sent a test of both versions, and that made both versions identical in dark mode. Maybe this is something to do with what [KevinMarks] was saying about fallbacks?
#
[Joe_Crawford]
correct
btrem joined the channel
#
vinceaggrippino
I'm trying to send an RSVP for the upcoming HWC meetup but webmention .app says that there are "No webmention supported links found". I'm linking to the event page as documented. What am I doing wrong? https://github.com/VAggrippino/vaggrippino.github.io/blob/ddd296195d95e8f7d65304f66d83f5b70858d033/docs/2025/01/hwc-london-29-jan/index.html#L76
#
vinceaggrippino
[edit] I'm trying to send an RSVP for the upcoming HWC meetup but webmention .app says that there are "No webmention supported links found". I'm linking to the event page as documented. What am I doing wrong? https://github.com/VAggrippino/vaggrippino.github.io/blob/ddd296195d95e8f7d65304f66d83f5b70858d033/docs/2025/01/hwc-london-29-jan/index.html#L76
#
Loqi
carrvo[d] has 7 karma over the last year
#
btrem
carrvo[d]++ for properly docking me. (And [tantek] you softie. How will I ever learn my lesson if you just give me the point back?! 20 points from Gryffendor!)
#
capjamesg[d]
vinceaggrippino[d] It works!
#
capjamesg[d]
I just sent a webmention from your site to the event page
#
capjamesg[d]
It now shows up on the event page:
#
btrem
[Joe_Crawford]: composer.json/composer.lock mismatch sounds plausible. I can't successfully run composer. I need to install some PHP stuff. Extension or some such thing. Might wade in today if I'm feeling brave.
#
capjamesg[d]
I think there may be a bug to file with webmention.app.
#
capjamesg[d]
Your code is valid.
#
btrem
jeremycherfas: I'm dating myself (again!), but in the early days of css, the advice was always define a color when you define a background-color, and vice versa. I don't think it applies anymore, but maybe dark mode/light mode reintroduces it.
#
vinceaggrippino
capjamesg++ Thank you. I used webmention .app manually (sort of) by pasting my URL into their form at /check. I suppose I'll start using Telegraph instead. Before I do, maybe I'll try to document it in a GitHub issue for Webmention .app.
#
Loqi
capjamesg has 46 karma in this channel over the last year (218 in all channels)
#
[Joe_Crawford]
btrem, if it was that I went ahead and did the `composer update` - https://github.com/aaronpk/IndieNews/pull/67 [aaronpk] in case that was the problem.
#
Loqi
[preview] [artlung] #67 Composer Lock Update
JadedBlueEyes joined the channel
#
btrem
An error showed up in #meta when it failed. Will a success message show up there to? Or is silence golden when it comes to deploys?
#
aaronpk
deploys only happen when i click merge
#
aaronpk
cross your fingers
#
btrem
Fingers crossed.
#
btrem
[Joe_Crawford]++ well spotted and well done.
#
Loqi
[Joe_Crawford] has 19 karma in this channel over the last year (126 in all channels)
#
btrem
aaronpk++ and sorry about the failed deploy. As I said, I can't run composer. I need to install extensions of some kind.
#
Loqi
aaronpk has 51 karma in this channel over the last year (136 in all channels)
JadedBlueEyes joined the channel
#
btrem
5 minutes in to trying to get composer to work and I'm already getting angry. :-/
#
btrem
I @#@!?!! hate php. Bloody hell. `composer update` ```you should install curl```. No further info. /Which version/ for cripes sakes!? I get that installed. `composer update` ```you need to enable intl```. Which .ini file?!?! $deity. Of course the .ini file is read-only. So I need to look up how to sudo edit the dang thing. Un-co the line.
#
btrem
...un comment the line. `composer update`. You'll never guess.... Still fails! :-D
#
btrem
There are 20 (20!) additional .ini files. Apparently, I need to verify that they are enabled in all of them.
#
btrem
Which, just, wow. Ok, rant over. Sorry all.
#
aaronpk
this is sadly pretty typical of these kinds of tools in every language, they assume you know the basics of getting the environment configured
#
aaronpk
you don't need to edit all 20 files, you need to create the one ini file to enable intl. you might also need to install from the system package manager if it isn't already installed.
#
vinceaggrippino
It's inspiring me to get back into PHP... any dev stack that inspires this type of *enthusiasm* must be good for a career path 😁
#
jeremycherfas
Confirmed by the subscirber who raised the problem, the fix works. Still hoping to join Fresh tomorrow, if for no other reason than to show the screenshots.
#
aaronpk
it now updates the UI live during each stage of the processing
#
aaronpk
the next step is the actual posting UI and then downloading the temp files to the final post's folder when it's created
#
[Joe_Crawford]
That's great aaronpk.
ttybitnik joined the channel
#
btrem
aaronpk: since you're (sort of?) offering to help... I already had a php.ini and un-commented the intl line. But what do I need to install?
#
[Joe_Crawford]
btrem were you asking for help? I didn't see that. `curl` and `intl` refer to https://www.php.net/manual/en/curl.installation.php and https://www.php.net/manual/en/intl.installation.php
#
btrem
Well, before, I wasn't. I was ranting. :-D But now I guess I am.
#
btrem
The second link you posted suggests that I need to compile php. That I'm not going to do.
#
[Joe_Crawford]
There are so so so many ways to install php. Precompiled binaries, brew, apt-get, things like XAMPP, it is VERY difficult to advise and help without knowing each and every part of your stack.
#
aaronpk
first question, what OS are you on and how did you install php in the first place?
#
aaronpk
i guess that's two first questions
#
btrem
Fear and surprise. Two greatest weapons. :-D
#
btrem
And an almost fanatical devotion to the pope.
#
btrem
aaronpk: Ubuntu. And AFAICT php 8.1 comes with it.
#
aaronpk
in that case, try sudo apt-get install php-intl
#
btrem
I got intl installed. Now I have to enable -- and maybe install -- dom extension. I find this totally bizarre. Isn't the point of a dependency manager to do this for you? Like, instead of composer telling me I need to install intl, then after I do that, telling me to install dom, shouldn't it install them for me? If I install dom, will it tell me on the next run that I need to install something else?
#
[Joe_Crawford]
Ubunutu uses `apt-get` to install software. If you are compile-phobic then that seems likeliest. Does `apt-get install php-intl` do anthing that looks right?
#
aaronpk
composer is at the language layer, intl/dom/etc are at a layer below that
#
btrem
Yes. I did that. Sorry our messages are crossing paths.
#
aaronpk
composer installs php language packages, but can't install parts of php itself
#
btrem
And crossed again. So sorry again.
#
[Joe_Crawford]
and if you're checking in a browser you may need to restart a webserver
#
sebbu
i know debian or ubuntu added an extension manager to apache, not sure if they added one to php or not
#
[Joe_Crawford]
curious to know if `phpenmod` is available to you.
#
sebbu
but intl & dom are usually bundled with it and just needs to be enabled
#
sebbu
in the php.ini
#
btrem
intl was apparently not. As for dom, I don't know, but again apparently not. The interwebs tell me to apt-get install either php-xml or php8.1-xml. Is this discussion too tedious for irc?
#
aaronpk
meh that's what the dev channel is for
#
btrem
Ok, so is it agi php-xml? Or agi php8.1-xml?
GuestZero joined the channel
#
[Joe_Crawford]
I would try the version without specific version. I *believe* apt-get will try to get you the appropriate version.
#
btrem
Let's find out!
#
btrem
It got the 8.1 version, so yes.
#
btrem
[Joe_Crawford]++
#
Loqi
[Joe_Crawford] has 20 karma in this channel over the last year (127 in all channels)
#
btrem
aaronpk++
#
Loqi
aaronpk has 52 karma in this channel over the last year (137 in all channels)
#
btrem
Thanks for the help.
#
btrem
aaronpk: you'll spend more time helping me then you would if you had just done the PR yourself. ;-)
#
[Joe_Crawford]
Nice job turning ranty consternation into installed and running software btrem++
#
Loqi
btrem has 2 karma in this channel over the last year (8 in all channels)
#
sebbu
btrem, ah, the official windows package includes them, the source package includes them too, but your distribution package might not
#
sebbu
(it's the same thing for apache btw, official site has a single tarball or windows package, distribution split the extensions)
thegreekgeek joined the channel
#
carrvo[d]
btrem, (late but whatever) the tools for installing PHP and dependencies for a limited project I had to use were (on Ubuntu): apt, composer, and pear.
#
carrvo[d]
capjamesg[d] Nintendo has QR codes to log into the Switch store that doesn't need a dedicated app. It is nice! No console keyboard. Don't know how it works of course but I could spend some time detailing how it feels and guesses into the backend (I am trained for backend dev).
#
aaronpk
probably the oauth device flow
barnaby joined the channel
#
carrvo[d]
Good chance of that. Don't know it yet, myself.
#
Loqi
aaronpk has 53 karma in this channel over the last year (138 in all channels)
#
capjamesg[d]
aaronpk++
#
carrvo[d]
Is that where they login, grab a code, then input it on the device? What I saw was a lot fancier.
#
capjamesg[d]
I assume #2 could be replaced with the user scanning a QR code from an auth'ed device?
#
carrvo[d]
All the same, thanks for that!
#
aaronpk
yep QR code works in place of displaying the letters
#
aaronpk
and if there's an app on your phone you're already logged in to you can smooth out the UX more
#
aaronpk
but it's the same on the wire under the hood
#
carrvo[d]
aaronpk++ excellent. How easy is it to add? Like, could that work with IndieAuth since it layers on top of OAuth?
#
Loqi
aaronpk has 54 karma in this channel over the last year (139 in all channels)
gRegor joined the channel
#
aaronpk
yep, [schmarty] has even done that before!
#
aaronpk
trying to find the link
#
[schmarty]
i have?? oh done a device auth proxy for IndieAuth.
#
carrvo[d]
"Code to come" 😁
#
[schmarty]
https://glitch.com/edit/#!/veil-mirror is the actual proxy. it is out of date IndieAuth-wise, but i do want to update it sometime soon!
#
[schmarty]
that said, feel free to fork it on glitch for your own purposes!
#
carrvo[d]
I don't have glitch but I might fork it on GitHub. Don't have a use, yet, but very interesting!
#
[schmarty]
looks like i haven't got the pyportal (device client) code onto my git hosting. it would need updating for modern circuitpython for sure.
#
Loqi
[preview] [aaronpk] Device-Flow-Proxy-Server: Add the OAuth 2.0 Device Flow to any OAuth server
#
[schmarty]
but the access token payload also gives any micropub/sub endpoints found.
#
btrem
aaronpk: PR created with middleware added. https://github.com/aaronpk/IndieNews/pull/68 Needs review! (You remember what happened last time!) N.B. the app returns 404 for the root url on my dev server, i.e. `/`. I assume that (a) it returns 404 for / because I don't have the data to show anything; and (b) the fact that it returns 404 means 404 is working and will work for e.g. /webmention. But caveat emptor.
#
Loqi
[preview] [btrem] #68 Fix: change response code for unkown urls to 404
#
aaronpk
thx, i will see if i have this running in a dev environment somewhere to test
#
aaronpk
will be later this afternoon tho
#
btrem
No rush, natch.
jak2k, GuestZero, nemonical, d1, sebbu2, ttybitnik, Zorb and vriska joined the channel