#dev 2020-09-20

2020-09-20 UTC
jessehattabaugh, jonnybarnes, jmac, VioletPixel, nickodd, geoffo, jessehattabaugh_ and [Chaitanya] joined the channel; nickodd left the channel
#
@quenerapu
Llegan las «webmentions». Un cambio muy interesante para todas las webs. » Webmentions are an open standard for a reaction to a thing on the web. It's currently in W3C recommendation status. Adiós comentarios, hola webmentions. https://dev.to/dailydevtips1/goodbye-comments-welcome-webmentions-499g
(twitter.com/_/status/1307583907571871744)
dhanesh95 and sgreger joined the channel
#
sgreger
Hi all! I am terribly stuck, trying to track down a bug in my Kirby Micropub plugin. When sending tags using Indigenous, they show up in the parsed request body, but with Quill they don't. Any pointers to what is the difference in how these two send their requests?
#
sgreger
I am referring to the category[] values in the encoded request ...I just can't figure out why they don't show up in the request body coming in from Quill, but they do when I use Indigenous.
moppy and jonnybarnes joined the channel
#
sgreger
Actually, after more digging, I just noticed that the tags are not included in the multipart request the Quill UI sends to quill.p3k.io - the "Request payload" only contains fields "content", "mp-slug" and "null". Tested on FF and Chromium, both times the form data sent by the UI contains this mysterious "null" field but no "tags". Is this potentially a bug in Quill?
jonnybarnes, nsh, smacko, jeremycherfas, dhanesh95 and jamietanna joined the channel
#
jamietanna[m]
sgreger I've just had a look my side, and I see `&category%5B%5D=foo&category%5B%5D=bar` being provided in the request, so it looks like Quill is working, but you may be expecting the wrong field? In Micropub we use `category` or `category[]` for tags
[jgmac1106], jonnybarnes and sgreger joined the channel
#
sgreger
jamietanna[m]: Thanks for confirming Quill + tags work for you! My problem must be something else, then. I just tried with FF80/Linux, FF80/Win, and Chromium85/Linux:
#
sgreger
In none of these do the tags get "tokenified" in the UI; they simply show up as a text field: https://user-images.githubusercontent.com/6355217/93711228-d225cb80-fb4c-11ea-8ce5-22ec0f47dee2.png
#
sgreger
And when I submit the form, the multipart request from the UI to the Quill server contains no tag field, but instead a "null" field: https://user-images.githubusercontent.com/6355217/93711284-4f514080-fb4d-11ea-8350-a74a389e2017.png
#
sgreger
...two different machines, three browsers, always the same issue (so I dare ruling out an adblocker or the like breaking some JS in the frontend). But if it works from your machine, I'm out of ideas what might be the cause.
#
jamietanna[m]
Ah interesting, I think you need to hit tab when you've added a tag, rather than comma separate them sgreger
#
sgreger
Hmm, that moves the cursor to the next input field (slug) :s
#
Zegnat
Hi sgreger! Long time no seen :) Hope you are well, apart from the micropub struggles. Lets see if Sink is still up and running, might be able to see what Quill posts there
#
Zegnat
Hmm, as soon as I write a comma in Quill, the tag becomes a little grey tag with an x mark
#
sgreger
Hi Zegnat, yes been working on a lot of Indieweb stuff for Kirby, but not on IRC in a long time :) All well here, hope you are too!
#
Zegnat
No idea where that null=null is coming from, that does seem like a bug. But yes, submitting the form I previously screenshotted: https://i.imgur.com/cfPE6UV.png
#
sgreger
zegnat: that's what I expect and remember but for some weird reason it does not happen. But with all of you confirming it works, it's quite obvious something on my end!
#
Zegnat
What happens if you log Quill into https://sink.zegnat.net on your end, sgreger? Just to doubly-doubly check that it is not the Kirby endpoint making things weird.
#
sgreger
Zegnat: it's a miracle - when I log in with Sink it works!
#
sgreger
So there's definitely something fishy with my plugin (that's good news; it means I can fix it).
#
Zegnat
Huh. Quill really hsould not make a distinction there xD
#
Zegnat
I haven't touched the Sink codebase in years, but pretty sure it does nothing special. I think it does not even provide the config endpoint for a client to check support
#
sgreger
Now this is getting even more bizarre. But at least all of above interactions prove that Quill itself is not the problem.
#
sknebel
hmmm... have you implemented anyhthing regarding the query for already existing categories?
#
sgreger
Config endpoint would have been my next guess. Maybe Quill expects some signal from Kirby that categories are supported? (Now I need to dig into code from April to see what my endpoint actually communicates)
#
sknebel
no idea if quill supports that, but that could cause confusion somewhere
#
sgreger
sknebel: I'll look into that, thanks! ...also: Hello - long time no see :)
#
sknebel
hey :)
#
Zegnat
As far as I remember, Sink flatly does not support config. So that could be a difference between it and the Kirby endpoint. Let us know if there is anything else we can do to help
#
Zegnat
Really missing travel over here, hope we can get together at a German event again in some future timeline, sgreger
#
sgreger
My endpoint indeed does reply to q=config requests, so maybe there's some error in that data that throws off Quill (and causes the tag tokenization to fail). I'll look into that later - thank you so much for leading me onto the (hopefully) right track!
#
aaronpk
sgreger: Can you check the dev console and see if there are any errors reported? If there's a JS error then it might prevent the tokenfield thing from running
jonnybarnes and sgreger joined the channel
#
sgreger
aaronpk: no console errors, no missing files (404s etc.) in the Network tab, nothing. Just no tokenfield. I'll try some things with the config query and report back (as it works with all non-Kirby sites).
#
aaronpk
Huh strange
#
aaronpk
that's the only thing I can think of
#
sgreger
indeed. it just fails silently. but when i use zegnat's sink tool, the UI is fine, so it must be something about my endpoint
#
sgreger
getting there: if i remove the `post-types` array from q=config, it works. my guess is that, since there was no post type of `"type": "note"` present in that array, Quill shows the Note editor window while believing notes are not supported?
#
sgreger
...something like that
#
Zegnat
That is an interesting edge case
#
sgreger
so, with no `post-types` array present, it works fine and the tags make it all the way into my Kirby post. interestingly, once I re-add "post-types": [{ "type": "note", "name": "Default" }] the tokenfield doesn't work again.
#
Zegnat
There should be a page within Quill that shows you the supported types. Maybe when you click your name or something? Can you see if that page seems to work?
#
sgreger
Well, there is the Settings page that correctly indicates "supported post types: * Note (note)" and Quill also correctly only provides the link to the Note editor window in the footer
#
Zegnat
So that part does work then. So weird.
#
sgreger
My q=config response is now as barebone as can be: just the `media-endpoint` URL string, an empty `syndicate-to` array and the `post-types` array with the Note entry.
jeremych_, swentel and dhanesh95 joined the channel
#
sknebel
at least you now know its not your bug :D
#
sgreger
sknebel: well, it partially was. returning an invalid value in the config array (post type "default") rightfully caused some hiccups. the problem when returning the correct "note" post-type might be something in Quill.
#
sknebel
true, but even the former is IMHO a client bug if it results in an input field being silently ignored
#
sknebel
(especially since "category" is not associated with any post type)
[tonz], [grantcodes] and jonnybarnes joined the channel
#
sgreger
thanks again to all of you for the assistance!
nickodd, [LewisCowles], [tw2113], geoffo, [schmarty], jessehattabaugh_, lahacker, curiousaboutindi, jonnybarnes and leg joined the channel; nickodd left the channel
#
@idoshamun
↩️ Webmentions is the next gen discussion platform
(twitter.com/_/status/1307758837504643077)
geoffo, VioletPixel, leg, [tw2113], jonnybarnes, [chrisaldrich], [snarfed] and j12t joined the channel