#wordpress 2018-09-01

2018-09-01 UTC
#
miklb_
suggestions on where I should look for the issue with micropub master?
ben_thatmustbeme joined the channel
#
GWG
miklb_: There is only one instance of gallery
#
miklb_
true, I can work back from there to see why it's inserting any HTML at all
#
miklb_
it's also inserting html for replies for instance
#
GWG
Darn
#
GWG
I thought I fixed that
#
miklb_
last I checked, when did you think you fixed it?
#
GWG
It is supposed to turn it off if Post Kinds is on
#
GWG
I haven't touched it
#
miklb_
yeah, it started doing it when I switched to micropub master
#
miklb_
I assumed the 2 issues were connected (photo gallery insert)
#
GWG
My guess is that I forgot to update the remove filter.
#
GWG
In Post Kinds
#
GWG
Yup
#
miklb_
ah, Micropub_Render
#
miklb_
is that filter change documented in the 2.0 update?
#
GWG
It isn't because it just occurred to me that I split the file but didn't explain which file has which filter.
#
miklb_
totally understand
#
miklb_
did a lazy person PR from the browser
#
GWG
I was focused on the unit tests passing
#
miklb_
OK, I've applied the fix to my live site so going to confirm in a minute
#
miklb_
confirmed that fixes prevents micropub from inserting HTML.
#
miklb_
but a photo still isn't attaching to the photo post kind that came through
#
miklb_
BUT, holy cow, I think with the media endpoint now, when you add a photo to Quill, it returns a preview and the URL that will be used. My WP site ran the upload through image-optim and copied to my cdn and returned all of that before publishing.
#
GWG
That's good, right?
#
miklb_
yeah, just need to get the image to show up in the note
#
miklb_
it's not inserting the gallery short tag, but it's not displaying in the html
#
miklb_
so going to dig into that next.
#
miklb_
using default kind template
#
miklb_
templates
#
GWG
I will be revamping them if you find anything
#
miklb_
well, I'm going to look for a hotfix first, then see what can be improved
#
GWG
I am going to be on Post Kinds improvements for a bit
#
GWG
So we'll see what happens
#
miklb_
weird. If I manually attach an image to a photo post, it displays, so something with the way micropub is assigning itself to the post isn't getting picked up by the shortcode in the photo kind template
#
miklb_
I'm going to keep digging, but that's what I've figured out so far
#
miklb_
it's not setting the `post_parent` to the ID of the note
#
miklb_
so the gallery shortcode can't find any images. I think.
#
GWG
If the media endpoint uploads it, it doesn't know what post yet
#
GWG
But I should have the plugin check
#
miklb_
just noting why the shortcode isn't working. There is still an mf2_photo array to get the image url
#
miklb_
should be able to check if the gallery is empty, and the fallback to grabbing that URL and manually inserting the img tag.
#
miklb_
unless you have an idea on how to attach the micropub image to note after the fact
#
GWG
attachment_url_to_postid
#
GWG
It's doable when the post is created
#
miklb_
hmm. I looked at that function and I'm not sure how it would be used
#
GWG
Get which URLs are attachments, and update them to attach to the post.
#
miklb_
OK, I'll look at the micropub code
#
GWG
All I have to do is add inside that xondition to update the attachment with the post ID
#
miklb_
so just change post_id to $id in the insert_attachment?
#
GWG
No.
#
GWG
wp_update_post( array( 'post_iD' => $id, 'post_parent' => $post_id );
#
GWG
Excuse me
#
GWG
wp_update_post( array( 'post_iD' => $id, 'post_parent' => $post_id ) ) ;
#
miklb_
so to test I'd just add that before the insert_attachment?
#
miklb_
tries
#
miklb_
w00t!
#
Loqi
giggles
#
miklb_
GWG++
#
Loqi
GWG has 76 karma in this channel over the last year (155 in all channels)
#
miklb_
would it help if I send that as a PR?
#
miklb_
or add an issue
#
GWG
Add an issue. I'll take care of it shortly.
#
miklb_
yay. Photo posting from micropub resolved. That's productive Friday evening. Thank you very much.
#
miklb_
sequelpro++
#
Loqi
sequelpro has 1 karma over the last year
#
miklb_
GWG does Parse This currently get called with a micropub post?
#
GWG
miklb_: Yes.
#
GWG
I'm working on enhancing that though right now with the new Parse This
[eddie], [jon], swordsmanz6, developers, [kevinmarks], decode1, O-dog1, lostlabyrinth13, jgmac1106, snarfed, [jgmac1106], [keithjgrant], samouy16 and dimi34ka3 joined the channel
#
miklb_
afternoon
#
GWG
Morning, miklb_
[jgmac1106] joined the channel
#
miklb_
how goes today?
#
GWG
Looking at parsing still.
#
miklb_
I just made blueberry muffins
#
GWG
I miss having an oven
#
Loqi
misses having an oven too
#
miklb_
I did too. I only recently fixed mine
#
GWG
My oven is too far to cook in.
#
miklb_
yeah, that's a long time to be working away from home. My sympathy
Zanzibar1 joined the channel
#
GWG
What is your next project?
icee29 and CompanionCube16 joined the channel
#
miklb_
back to the theme framework.
#
miklb_
and a plugin to auto-syndicate likes & reposts to twitter/github if the url matches
#
miklb_
If I had a dollar for everytime I've typed that I could have paid someone to write it by now 😂
#
GWG
I had to put the syndication project on the back burner.
#
miklb_
I think we figured out that wouldn't affect what I want to do, but good to know.
#
miklb_
I was more waiting until micropub was stable and working with indieauth. Which it is flawlessly now for me.
#
miklb_
I want to set them in amber
#
aaronpk
oh that's good to hear
#
miklb_
sorted out my last 2 issues last night
#
miklb_
aaronpk++ for Quill photo upload when using media enpoint
#
Loqi
aaronpk has 12 karma in this channel over the last year (313 in all channels)
#
GWG
I still need to decide when to release it.
#
miklb_
not when you are tired and jet lagged
#
GWG
I'm not now
#
miklb_
I'm not so sure :-)
eido1on joined the channel
#
GWG
So, I have separated Parse This into a library that I am thinking of giving its own repository
#
GWG
So it can be bundled as needed
#
GWG
Thoughts?