Project

General

Profile

Bug #8183

Edit of Post creates notification emails

Added by Matt Gold 8 months ago. Updated 5 months ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Group Blogs
Target version:
Start date:
2017-05-22
Due date:
% Done:

0%


Description

Hi Boone,

I think that Bug 6350 is cropping up again. An editor of JITP edited an old post and a notification was sound out -- one showing it as getting published, the other as getting edited. Please see the notification email attached

original_msg (11).txt View (38.7 KB) Matt Gold, 2017-05-22 01:24 PM


Related issues

Related to CUNY Academic Commons - Bug #6350: Editing blog posts results in activity items Resolved 2013-10-22
Related to CUNY Academic Commons - Bug #2844: Commons bug re: editing blog posts Resolved 2013-10-22
Related to CUNY Academic Commons - Bug #8535: Blog post edit triggers group notification Resolved 2017-08-15

History

#1 Updated by Matt Gold 8 months ago

  • Related to Bug #6350: Editing blog posts results in activity items added

#2 Updated by Matt Gold 8 months ago

  • Related to Bug #2844: Commons bug re: editing blog posts added

#3 Updated by Boone Gorges 8 months ago

This is not exactly a recurrence of #6350, though the filter introduced in #6350 accidentally caused the problem in this ticket to be covered up. The workaround in #6350 was rolled back as part of #7683.

Briefly, this problem only exists for legacy posts. A number of years ago (it appears to be May 2013 or so), bp-groupblog was modified so that groupblog activity items had the type 'new_groupblog_post' rather than BP's default 'new_blog_post'. Posts created before this date (actually, most posts - some have new_groupblog_post, for reasons I don't recall) have 'new_blog_post' activity items. When bp-groupblog looks for existing groupblog activity items corresponding to the currently edited post, it looks for 'new_groupblog_post' items. As such, it misses the existence of the existing activity item, and creates a new one.

Ray - Rather than writing a kludge workaround, my inclination is do something like this:

UPDATE wp_bp_activity SET type = 'new_groupblog_post' WHERE type = 'new_blog_post' AND component = 'groups'

Can you spent 60 seconds thinking about whether this would have any weird consequences? I'm 95% sure it's safe.

#4 Updated by Raymond Hoh 8 months ago

Sounds safe to me.

Maybe the cac_block_groupblog_activity_bump() function can be removed after the DB query is run?

#5 Updated by Boone Gorges 8 months ago

  • Category name set to Group Blogs
  • Status changed from Assigned to Resolved
  • Target version set to 1.11.2

Thanks, Ray. I've run the query, which should fix this ticket.

I think you're right that that function is no longer needed, though to be honest, I'm unsure why it didn't prevent what Matt describes in this ticket. Not worth further investigation, I guess. https://github.com/cuny-academic-commons/cac/commit/3cccfa927d17f394500b33943ea6aebde0538c01

#6 Updated by Boone Gorges 8 months ago

  • Related to Bug #7997: Transition from single cac-files.php file server to site-specific .htaccess directives added

#7 Updated by Boone Gorges 8 months ago

  • Related to deleted (Bug #7997: Transition from single cac-files.php file server to site-specific .htaccess directives)

#8 Updated by Matt Gold 8 months ago

Thanks to you both!

#10 Updated by Boone Gorges 5 months ago

  • Related to Bug #8535: Blog post edit triggers group notification added

#11 Updated by Boone Gorges 5 months ago

Luke - I've opened #8535 to track the new issue, which seems similar to this one on the surface but appears to have a different cause.

Also available in: Atom PDF