Posts merging

Notification - Posts merging

Re: Notification

by jackennils » Mon Aug 20, 2018 5:41 pm

Yes, that's what I did.

Then I made a post and a second one with a mention. After submitting the second one, I saw a white page with only the two debug lines above. But the posts were merged and the notification was sent. I just need to get rid of the debug messages.
User avatar
jackennils
Registered User
Posts: 229
Joined: Mon Jun 01, 2009 7:48 pm

Re: Notification

by rxu » Mon Aug 20, 2018 6:08 pm

Oh, I see. The issue can be addressed in several ways, f.e. by altering the ext/paul999/mention/event/main_listener.php:

Code: Select all

FIND
'core.modify_submit_post_data'          => 'modify_submit_post',

REPLACE WITH
'core.modify_submit_post_data'          => array('modify_submit_post', 1),

FIND
'core.markread_before'                  => 'mark_read',

AFTER, ADD
'rxu.postsmerging.posts_merging_end'                  => 'submit_post',
And then purge the cache in ACP.
rxu
Extensions Development Team
Posts: 4018
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation

Re: Notification

by jackennils » Mon Aug 20, 2018 8:27 pm

I tried it, still getting the debug messages.
User avatar
jackennils
Registered User
Posts: 229
Joined: Mon Jun 01, 2009 7:48 pm

Re: Notification

by rxu » Tue Aug 21, 2018 1:42 pm

The posts merging listener edit is not needed probably if you apply the above one.
rxu
Extensions Development Team
Posts: 4018
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation

Re: Notification

by jackennils » Tue Aug 21, 2018 1:55 pm

I just tried it. If I just amend the listener of the Simple Mentions Ext, then I don't get a notification when someone is mentioned in second post which gets merged.
User avatar
jackennils
Registered User
Posts: 229
Joined: Mon Jun 01, 2009 7:48 pm

Re: Notification

by rxu » Tue Aug 21, 2018 4:57 pm

I meant amending edit of the Posts merging ext listener.
rxu
Extensions Development Team
Posts: 4018
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation

Re: Notification

by jackennils » Tue Aug 21, 2018 4:58 pm

When I only edit the PostMerging listener, then I get the debug messages. Same with both. Only Simple Mentions listener has no effect at all.
User avatar
jackennils
Registered User
Posts: 229
Joined: Mon Jun 01, 2009 7:48 pm

Re: Notification

by rxu » Sat Aug 25, 2018 5:37 am

OK I've sorted out the problem. In addition to edits made to the mentions listener here https://www.phpbb.com/customise/db/exte ... 96#p646996, edits to the postsmerging listener are needed as following:

Code: Select all

OPEN
\ext\rxu\PostsMerging\event\listener.php

FIND
$merge_post_data = $this->helper->get_last_post_data($data);

AFTER, ADD
$post_visibility = $merge_post_data['post_visibility'];

FIND
'url',

AFTER, ADD
'post_visibility',
and purge the cache in ACP.
rxu
Extensions Development Team
Posts: 4018
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation

Re: Notification

by jackennils » Sat Aug 25, 2018 10:02 am

Super, that works! Thanks a lot.
User avatar
jackennils
Registered User
Posts: 229
Joined: Mon Jun 01, 2009 7:48 pm