Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't delete dead syndicated link #212

Open
cybeardjm opened this issue May 12, 2024 · 12 comments
Open

Can't delete dead syndicated link #212

cybeardjm opened this issue May 12, 2024 · 12 comments

Comments

@cybeardjm
Copy link

I tried to remove a dead link from the Syndication Links for a post, by editing it in the WP interface.

  • tried directly deleting the link in the appropriate box: when updating it is restored
  • tried replacing by a new one: when updating the post, the new link was added and the "older" one was restored

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...

@janboddez
Copy link

janboddez commented May 12, 2024

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?

@janboddez
Copy link

janboddez commented May 12, 2024

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 ...)

@cybeardjm
Copy link
Author

@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.

@janboddez
Copy link

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!

@dshanske
Copy link
Owner

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.

@cybeardjm
Copy link
Author

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".

@cybeardjm
Copy link
Author

Move the "unlink" option to the Syndication Links box, perhaps?

@dshanske
Copy link
Owner

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.

@janboddez
Copy link

janboddez commented May 12, 2024

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!

@dshanske
Copy link
Owner

@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.

@janboddez
Copy link

janboddez commented May 13, 2024

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
Copy link

janboddez commented May 13, 2024

@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."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants