Open cybeardjm opened 6 months ago
In principle, the "Add Mastodon URLs to syndication links" option just filters the output. (I think!) It uses the get_{$post->post_type}_syndication_links
filter to get the Mastodon URL (from its "own" meta field), if any, and add it to Syndication Links' list of links.
If the link in question was added by Share on Mastodon, it probably only exists in that plugin's post meta, and you should be able to delete it using the "unlink" link in Share on Mastodon's meta box or sidebar panel.
If the link was added through another plugin or Syndication Links itself ... maybe a conflict with the Gutenberg editor?
Oh, it probably also adds the link on the admin screen, and then on update it'd end up in Syndication Links' post meta. And when you update it there but not delete it "from" Share on Mastodon ... it may get re-added? Could that be it?
Can you try "unlinking" the Mastodon link? Or is that link not the one you're looking to delete? (If so, I don't see why it'd keep getting re-added. Unless it's a Gutenberg thing after all ...)
@janboddez Oh, I'd never seen the "unlink" before... Thx. OK, it worked but after I "unlinked", I understood that I had to manually remove the URL from the Syndication Links too or else it would persist.
I could try and make it so that the links only get added on the front end. That way they'd not end up being saved in syndication links' list of links as well. Still not perfect, but potentially less confusing!
I could try and make it so that the links only get added on the front end. That way they'd not end up being saved in syndication links' list of links as well. Still not perfect, but potentially less confusing!
Maybe I should tackle this once and for all.
I'd say, it would be even more confusing, having a link on the frontend and not finding it in the "usual" Syndicated Links list, not knowing about the "unlink" option from "Share on Mastodon".
Move the "unlink" option to the Syndication Links box, perhaps?
Move the "unlink" option to the Syndication Links box, perhaps?
Well, let me review the code. I know I had some code to copy the URL from the location it is stored in the other plugin. This might need to be redone to not keep copying it again...essentially, on change only.
I'd say, it would be even more confusing, having a link on the frontend and not finding it in the "usual" Syndicated Links list, not knowing about the "unlink" option from "Share on Mastodon".
Maybe, haha. I don't know. My idea was to only filter the list on the front end. Add in any links Share on Mastodon has added. That's why it's behind a checkbox (which only shows when both plugins are installed, most people wouldn't get to see it) and all. I wasn't aware they'd get saved when the post is edited, my mistake!
Although I also understand your point of view!
@janboddez I'm going to be heading back after IWC DUS tomorrow, but give me a chance to dig in before you change anything elsewhere.
OK, it worked but after I "unlinked", I understood that I had to manually remove the URL from the Syndication Links too or else it would persist.
I kind of forgot that Share on Mastodon "needs" a link to not re-share (but only when the checkbox is ticked). What I'm saying is, if sharing is enabled and there's no "previous" link, it will attempt to "share." (Which only makes sense.) So you'd wanna make sure the box isn't selected anymore, either, when you next update the post in question!
@janboddez I'm going to be heading back after IWC DUS tomorrow, but give me a chance to dig in before you change anything elsewhere.
Another thing we (or I) could do is directly add it to SL's list (only once). And stop adding it "after the fact."
I tried to remove a dead link from the Syndication Links for a post, by editing it in the WP interface.
Check 3rd link to Mastodon at the bottom of this page https://amf.didiermary.fr/nkono-teles-martin-street-special/
How can I edit/replace/remove syndicated links?
PS: I usually use "Share on Mastodon" by @JanBoddez with the "Add Mastodon URLs to syndication links" option on, that might add a flag somewhere in the options...