pfefferle / wordpress-semantic-linkbacks

More meaningfull linkbacks
https://wordpress.org/plugins/semantic-linkbacks
MIT License
31 stars 18 forks source link

Notification mails messed up since last release #35

Open mundschenk-at opened 9 years ago

mundschenk-at commented 9 years ago

Since the last release, the notification mails sent by Wordpress are compelete messed up. As the blog admin, I get empty mails like this:

Ein neuer Kommentar zum Beitrag „“ wartet auf deine Freigabe

Autor: (IP: , ) E-Mail: URL: Kommentar:

while the post author gets mails that contain the entire article in the "Comment:" field ("Kommentar" in the above quote). With the previous version, notifications worked fine.

mundschenk-at commented 9 years ago

Moved from https://github.com/pfefferle/wordpress-webmention/issues/51

pfefferle commented 9 years ago

That is really strange, because this change was only made because of "messed up" comments https://github.com/pfefferle/wordpress-semantic-linkbacks/pull/30

@dshanske can you reproduce this issue?

armingrewe commented 9 years ago

Just to confirm from the other thread (sorry can't link, on mobile phone with slow connection), I've got the latest versions of both plugins on my blog and it works fine. It's better than before as it now gives me the name instead of saying "Bridgy response".

dshanske commented 9 years ago

That was the change I made. It now enhances before the comment goes out whereas before it did so after, so it should show better notifications. It did in all the tests I did. That's consistent with armingrewe's report.

Sinc ethe change, I've gotten multiple webmentions and it shows the name. The comment field is blank, but that is mostly because without changing the function that generates the email, it displays a webmention like a comment, not like a ping.

dshanske commented 9 years ago

This, for example, came in last night...

A new comment on the post "Israel Reclassifies Heinz Ketchup" is waiting for your approval https://david.shanske.com/2015/08/25/israel-reclassifies-heinz-ketchup/

Author: Ruth Shanske (IP: 107.178.195.220, 220.195.178.107.gae.googleusercontent.com) E-mail: URL: https://brid-gy.appspot.com/like/facebook/100002356503167/898565100232032/10202399685485986 Comment:

armingrewe commented 9 years ago

Confirmed, that's how mine look as well. Under comment it says liked this, RT or whatever the type is.

mundschenk-at commented 9 years ago

Maybe it's because these are internal webmentions (which I'd like to disable but can't at the moment) resulting from linking between articles. Until the update, they looked like this:

Ein neuer Kommentar zum Beitrag „Stefan Prieler verläßt die Brasserie Santner - (fast) ein Abschiedsessen“ wartet auf deine Freigabe https://mundschenk.at/stefan-prieler-verlaesst-die-brasserie-santner/

Autor: Bei Katharina Prato im Palais | Der Mundschenk & Cie. (IP: 10.0.0.2, www.local) E-Mail: URL: https://mundschenk.at/prato-im-palais/ Kommentar: This Article was mentioned on mundschenk.at

The mails were identical for the blog admin and the post author. Now, with the update, the mail for the blog admin is empty as described above and the mail for the post author looks like this:

Ein neuer Kommentar zum Beitrag „Durchs wilde Burgenland“ wartet auf deine Freigabe https://mundschenk.at/burgenland-wein-2012/

Autor: Der Küchenmeister (IP: 10.0.0.2, www.local) E-Mail: URL: https://mundschenk.at/zur-dankbarkeit-podersdorf/ Kommentar: Nach den Schwei­nen aus der Hölle hat­ten wir uns eine Stär­kung ver­dient. Zur Wahl stan­den zwei Lokale: Das Press­haus in Ill­mitz und das Gast­haus zur Dank­bar­keit in Poders­dorf. Die Wahl fiel uns nicht leicht – wir hat­ten in bei­den in der Ver­gan­gen­heit gut geges­sen und auch der als Ent­schei­dungs­hilfe her­an­ge­zo­gene Gault-​Millau führt beide Lokale mit iden­ter Punk­te­wer­tung. Schließ­lich gab die län­gere Zeit­spanne, die seit unse­rem letz­ten Besuch in der Dank­bar­keit ver­stri­chen war, den Ausschlag. [...]

dshanske commented 9 years ago

Well, there is a clue. The admin and the post author are different. In all my testing, they were the same.

Do you have any plugins related to comment moderation/notification installed? Just to eliminate the possibility of interaction.

mundschenk-at commented 9 years ago

WP Ajaxify Comments and WP Better Emails are installed on this machine. I can try to disable them for the moment.

dshanske commented 9 years ago

Try disabling Better Emails and doing a test.

In the meantime, I'll reread the WordPress code for generating the text, and look at how that plugin works.

mundschenk-at commented 9 years ago

Sorry to get back to you so late, but I've struggled with the WP 4.3 wp_batch_split_terms bug ...

Anyway, it looks like an interaction with WP Better Emails was the culprit regarding the empty mails for the blog admin. Now both addresses get the whole blog post in the comment - still not ideal, IMHO.

dshanske commented 9 years ago

Agreed, but that is because, to show the prettified mention that Semantic Linkbacks generates, we'd need a custom notification function. I fiddled with the idea a bit.

The change that started this was that before, the enhancement to the mention that Semantic Linkbacks makes were run after the email was sent. They are now run before.

dshanske commented 9 years ago

The question is, in the end, is this an issue that needs fixing? The notifications aren't perfect, but enhancing them before seems to increase their utility over enhancing them after the notifications.

I would say, on the face of it, we shouldn't revert the change.

armingrewe commented 9 years ago

My vote would be for keeping the new version, for me the enhanced emails are more helpful

mundschenk-at commented 9 years ago

Just had a look at the actual code. I'm sure there is a reason why you don't change the comment body in the database, but what is it? It's not as if the full text of the mentioning post (including HTML tags as plain text) in the database is actually useful for anything.

dshanske commented 9 years ago

Static is less flexible than dynamic.

mundschenk-at commented 9 years ago

Sure, but slower, too. Bot how about some middle ground? A one-time copy of the dynamic text so that the emails are sent with meaningful content and the database doesn't fill up with crud?

dshanske commented 9 years ago

What would you do about existing entries? You would have to reprocess all comments.

mundschenk-at commented 9 years ago

No, I meant in addition to the dynamic processing, not instead. The old comments stay as they are (and are dynamically formatted for display).

dshanske commented 9 years ago

I am also trying through WordPress.https://core.trac.wordpress.org/ticket/33587

dshanske commented 9 years ago

The notification system is mostly unchanged since version 1.5. It needs work.

mundschenk-at commented 9 years ago

Yeah, I just had a look at that ticket. I had no idea it was running on code that old. So maybe an interim solution would be an option to disable internal web mentions completely? While the notifications should look nicer, the more pressing problem is that I'm flooded with internal notifications when I update shortcodes (or whatever) in old posts,

dshanske commented 9 years ago

Self mentions might be something worth having a special case for.

dshanske commented 8 years ago

WordPress ticket https://core.trac.wordpress.org/ticket/33587 is now closed and set for 4.4.

However, enhancements that could be better used by Semantic Linkbacks and Webmentions remain in Ticket https://core.trac.wordpress.org/ticket/33735. If it doesn't make 4.4, which closes for enhancements within the week, I'm going to write a plugin for anyone who wants better notifications and try to get 33735 into 4.5.

dshanske commented 8 years ago

What the heck...it only took me a few minutes. Needs work.

https://github.com/dshanske/semantic-notification

dshanske commented 7 years ago

With the changes in the code, is this still an issue?

mundschenk-at commented 7 years ago

Since disabling the self-pings, I've not had the problem. I can't tell if the root cause has been fixed, though.

dshanske commented 6 years ago

I am going to try to incorporate some of the notification code as an option here.

asuh commented 3 years ago

@dshanske I would like to report that as of the latest version of Semantic Linkbacks, this is still an issue. I had to disabled this on a client site that relies on comment URLs showing up in email notifications. Additionally, I had no luck with disabling self-pings to fix the issue.

asuh commented 3 years ago

The temporary fix to this issue is to comment out two lines in the following file: 14 and 16 https://github.com/pfefferle/wordpress-semantic-linkbacks/blob/master/includes/class-linkbacks-notifications.php

Commenting them out fixed my issue not seeing the text above the bottom approve, trash or spam links.

This is probably the best fix for this issue until a fix is added.