#gRegorLoveThe bearer token coming back from the micropub client (like quill) will have one or more scopes requested. Your endpoint code needs to check that.
#gRegorLoveOh, and an explicit p-name around just the note's content will be good too. p-name is used a lot in reply contexts. It's implied if the property doesn't exist, so usually returns more than desired. That's why my reply-context to you on https://gregorlove.com/2017/05/welcome-aboard/ has the extra "published" text and webmention stuff
#ZegnatDo you have your website on GitHub where I can just clone it?
#jeremycherfasBut here’s the odd thing. Although I have several routes and paths set in the webmention.yaml, prompted by your question I did a dump on those. And only the first one of each is present in the array. Now that really is very odd.
#jeremycherfasEven changing the order of the Ignored in webmention.yaml does not change them in the dump.
#petermolnarI see Grav popping up more and more, interesting; the last time I tried it it collapsed under my site, I wonder if the media cache handling got any better
#jeremycherfasSo I’m thinking there’s something very wrong indeed with how the plugin gets the paths from config.plugin.webmention
#jeremycherfasPetermolnar: my site isn’t very media heavy, so I can’t really tell you. I’d love to fix this problem, though, Without it, Grav is useless for indieweb.
#jeremycherfasUnless someone else builds a better plugin.
#petermolnarin this context, 'someone' always applies to the one who wrote the sentence ;)
#ZegnatOr you bribe someone like me, who is procrastinating on his own project ;)
#petermolnarZegnat for Grav, the used to use an image resizer which was GD based and therefore it wasn't possible to keep metadata for the downsized images, which was a dealbreaker for me
#petermolnarif that's still the case, that project would really benefit from an imagick port
#ZegnatI have done Imagick work for the Indexhibit CMS during a summer internship, working on code to keep colour profiles intact or optionally apply the profile and convert the colours in the image so nothing looked “washed out” in browsers.
#jeremycherfasPetermolnar I am trying to improve it in one way, which I started at IWC last weekend. But then cweiske identified this other problem which I thought would be reasonably easy to solve.
#ZegnatCurrently it does a strpos to find '</head>'. Pull that out into its own variable. Then check that variable and if it didn’t find </head> it should not append the LINK element.
#jeremycherfasMind you, I may have got another clue that I am now looking at.
#ZegnatBut you have to be sure that </head> never appears in any other output. Which is bad.
#ZegnatThe ignore list is really what you want to be using and what needs fixing
#jeremycherfasAnd then, in ythe second bit, you use your variable instead of the thing he originally used.
#jeremycherfasBUT here’s the bit I don’t understand: your new variable is equal to the thing he originally used.
#jeremycherfasSo, what’s the change? Reutrning if that is empty?
#ZegnatAlmost. He uses strpos() to find where in the output </head> is. That is fine. strpos() will return boolean FALSE if it can’t find what it is looking for. It just so happens that FALSE == 0 so the original substr_replace() kept working even if no </head> was found.
#ZegnatI do the strpos() earlier and explicitly check if it is FALSE. Because when it is, we are (probably) not dealing with (valid) HTML and we can exit early.
#ZegnatIf </head> is found I do exactly the same code he was doing to insert it. I just do a miniscule time saving by not running strpos() again within the replace and use my previously stored variable instead.
#jeremycherfasI did try inserting a test for the format of the page, which was why I was asking about return and exit yesterday, but that didn’t seem to work for me.
#ZegnatThis just has the big problem that it will still insert the LINK if (for whatever odd reason) you would try to create this JSON: {'headsClose':'</head>'}
#ZegnatOr any other output with the literal string </head> anywhere in it.
#ZegnatThat’s why I am still going to take a look at the ignore settings
#jeremycherfasIt works locally! I cannot thank you enough.
#Loqi[jeremycherfas] #5 Plugin breaks RSS and Atom feeds
#jeremycherfasI guess I could do a multifile search for that literal string.
#ZegnatYes, I might file a PR for this anyway, even if it’s not strictly correct still. You really need to know whether Grav is writing HTML at the time or something else for this to work :/
#ZegnatMight be better to see if output starts with <!doctype, but even that feels iffy to me
#sknebelif that's really hard to do it might be better to just switch the default to Link-headers, they don't hurt if they end up on the wrong files at least
#sknebel(I assume you can't get at the content-type at this stage in the flow?)
#sknebel(sorry for rambling from the sidelines :P)
#jeremycherfasZegnat: I tried that, using page.format, or something like it, but I couldn’t get the exit conditions correct. There is a variable that tells you whether the template_Format is HTML, or ATOM or RSS
#jeremycherfasSknebel: I can get at the content type, but I could not get the return/exiot logic to work.
#ZegnatOh, you should be able to add that to my if statement then! if ($headElement === false || $template_format_variable_thingy !== 'HTML')
#jeremycherfasAnd the good news (I think) is that </head> does not appear as a string anywhere else in the whole install.
#ZegnatI clones your grav-admin and then cloned your user into it. Can’t run it on my server though. Are there more things?
#jeremycherfasNot that I am aware of. Are you getting error messages?
#jeremycherfasAlternatively, and probably better in the long run, download the grav skeleton from getgrav.org and create a user for yourself. Then you can probably download my user folder too.
#jeremycherfasGrav does allow multiple users, but I have never played with that.
#ZegnatClone now runs, but it doesn’t have a LINK header for the webmentions at all. So not really a clone of your site ;)
#Loqi[edhelas] All the public Movim feeds can be exported to Atom XML feeds https://nl.movim.eu/?feed/pubsub.movim.eu/Movim . Is his format an IETF one? I prefer to stick to Internet standards and not use some indie protocols and formats for now (especially regardi...
#jeremycherfas!tell ben_thatmustbeme I’m working on Grav — without much success.
#LoqiGrav is a flat-file CMS built on PHP, with Twig templating, and YAML + Markdown for storing articles (YAML for metadata, Markdown for the content) https://indieweb.org/Grav
#Loqizegnat has 8 karma in this channel (52 overall)
#jeremycherfasNow, of course, I have to get back to my IWC project and actually display those pesky webmentions.
#ZegnatStill not a total fix. Definitely needs checking that template_format is HTML.
#ZegnatBut happy I could help :) Hope you understand what is being done there. If you have questions you know where to find me
#jeremycherfasI know how to do the template format check, but I didn’t know how to get out afterwards. I think I do now.
#jeremycherfasI do still think it is worth your putting in the PR.
#jeremycherfasAnd I will pick up where I left off on trying to get the plugin to use XRay, to make it simpler to handle the received data.
#Zegnatalso, jeremycherfas, maybe add the accounts folder within user to your .gitignore so you don’t check in information like email address and hashes password
#ZegnatAah, I got mentions to show up. Finally I can check the code
#jeremycherfasI tghink I see what has happened. I have a separate repo for the plugin alone, because ultimately I want to submit the switch to XRay. And of course the folder is also under /user. But I hadn’t pushed /user in a while
#Zegnatjeremycherfas, are you going to be self-hosting XRay or using aaronpk’s public instance?
#[colinwalker]I've got a plugin which creates a meta box. Then a function is hooked in to save_post to update the contents of a post with values from the meta box. It works fine when the function to do this is in the main plugin file but if I move it to an include it stops working.
#[eddie]schmarty++ I too am looking at webmentions, but since I live in the slack world I think I'm gonna filter it into a slack room on my personal slack account
#Loqischmarty has 3 karma in this channel (13 overall)