Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Rerun on Update #39

Closed
dshanske opened this issue Sep 24, 2015 · 22 comments
Closed

Rerun on Update #39

dshanske opened this issue Sep 24, 2015 · 22 comments

Comments

@dshanske
Copy link
Collaborator

Linkback Fix should be rerun on update comment by being added to the edit comment hook.

@singpolyma
Copy link

I'm not sure if this is true, because of manually editing comments, etc.

related: pfefferle/wordpress-webmention#57

@dshanske
Copy link
Collaborator Author

Maybe the solution is that updating a webmention has a hook to it that can rerun the function.

@pfefferle
Copy link
Owner

OK, found the problem... It is a result of this change: bb13b0e

Not sure what the best fix would be atm. Reverting to the old <linkback>_post will break the notification mails and adding an edit_comment might result in an infinite loop or (as @singpolyma mentioned) will disallow manual changes.

@dshanske
Copy link
Collaborator Author

Well, currently only webmentions support update. So, adding the hook back to the webmention hook might work. All you have to do is add a flag very early on in linkback_fix that stops it if it finds the comment meta you added in, indicating it has already been processed.

@pfefferle
Copy link
Owner

but what about the notification emails?

@singpolyma
Copy link

What was causing emails to not go out? Adding a hook on a nonstandard action shouldn't affect core actions at all...

@pfefferle
Copy link
Owner

This was the problem: #25

@singpolyma
Copy link

#25 is about presentation filters, which do not need to be changed. The proposal is to add a hook to the webmention action, and keep everything else (including all current hooks) as-is.

@pfefferle
Copy link
Owner

Sorry for my short answers :)

@dshanske detected that the <linkback>_post hooks are fired after the notification mail was sent, so the text in the mail was very limited and not interpreted by the semantic-linkbacks plugin. So we changed that to the comment_post hook and now have problems with the updates. So I think we should revert the changes to use the old hooks bb13b0e

And wait until the notification improvement was discussed by the WordPress guys: https://core.trac.wordpress.org/ticket/33587

@singpolyma
Copy link

So, the proposal here to to keep the comment_post hook and add the webmention hook along with logic to prevent duplicating effort when a webmention comes in the first time.

@dshanske
Copy link
Collaborator Author

@singpolyma Exactly

@dshanske
Copy link
Collaborator Author

The notification improvement was to make notifying a hook on comment_post. Which fires before linkback_post

@pfefferle
Copy link
Owner

I am not sure if this fixes the problem completely, because the plugin also supports Pingbacks and Trackbacks, not only WebMentions.

@singpolyma
Copy link

But only webmentions support being updated. The others ignore dupes

@dshanske
Copy link
Collaborator Author

Let me see if I can work up a pull request in the next few days.

@pfefferle
Copy link
Owner

@singpolyma but why not improve linkbacks and trackbacks?

@dshanske what do you plan to add?

@pfefferle
Copy link
Owner

I am not sure if it is a good style to only use comment_post because of the limitation of the notification hooks. So I would prefer to use the <linkback>_post hooks, because they are per definition the correct ones, and to improve the notification mails with hooks.

@dshanske
Copy link
Collaborator Author

To really change trackbacks and pingbacks we'd need Core to support a common handler for the two. Thinking of proposing it, but no one seems interested in Linkbacks in general.

@dshanske
Copy link
Collaborator Author

@pfefferle You want to bundle a custom notification function in Semantic Linkbacks?

@dshanske
Copy link
Collaborator Author

@pfefferle I was going to try to further break down the code.

@snarfed
Copy link

snarfed commented Nov 6, 2015

yay thank you!

@dshanske
Copy link
Collaborator Author

dshanske commented Nov 6, 2015

I am working on a better solution for this in 4.5

snarfed added a commit to snarfed/bridgy that referenced this issue Mar 25, 2021
specifically using "Bridgy Response" HTML title for liker's name.

for #516. not sure that this has been fixed in the wordpress plugins, but hope so, in pfefferle/wordpress-semantic-linkbacks#39 or pfefferle/wordpress-webmention#57 or nearby. it's been 5y. :P
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants