[TH] Auto Merge Double Posts [Deleted]

Is this an awesome addon will receive update to 2.2?

The Big Lebowski What GIF by MOODMAN
 
@Lukas W. Would it be possible to make a separate thread starter permission to never merge in one's own thread and/or a permission for a choice (checkbox) for users with the permission to choose that a post won't merge when posting it?

In my personal usecase, the thread owner in the relevant section usually is the only person who would want to do a double post, with occasional admin/mod exceptions. Everyone else can generally be merged.
 
This is an interesting development during an upgrade:

1605627399134.webp

Do I uninstall one safely? Or uninstall both and reinstall the latest?

Regardless, it might be something you want to fix. 😉
 
Thanks for the add-on. It's working properly but the thread starter exception which @osieorb18 mentioned above is really important missing for some cases. At least it would be great if the add-on doesn't merge replies with first post.
 
You'll have to set it to unlimited if you want to have it merged every single time, not to 0. It's the number of hours, that have to be between two posts until they are no longer merged. If you leave it at 0, that means as soon as "0 hours have passed" (= instantly), the next post will no longer merged into the one before.
In all due respect, some of your settings are a little obscure. And your instructions are not complete, which forces people to ask questions about how things are supposed to work. You should consider going back through this information so that forum admins know exactly what the consequences of settings are without having to guess or ask questions.

Not to be insulting, but this is a problem with many add-ons. Of course, it would also help if the setup here automatically opened to the Overview of a resource, and not the last message, so you don't have to do an extra step or two to figure out what the thing does. That's on the developers, and I hope they are paying attention.
 
@Lukas W. Would it be possible to make a separate thread starter permission to never merge in one's own thread and/or a permission for a choice (checkbox) for users with the permission to choose that a post won't merge when posting it?

In my personal usecase, the thread owner in the relevant section usually is the only person who would want to do a double post, with occasional admin/mod exceptions. Everyone else can generally be merged.
I have to admit this is the same for me.

For instance; I make a new thread with links to an event, information etc. But I also post updates before others respond to the thread. My best case scenario would be the first post in every thread is ignored regardless of the poster.
 
Hello, Lukas W.
You can consider an option in the plugin that allows you to enable and disable the ability to exclude the first two posts from being stitched together after a topic is created. So that after the creation of the topic the rule of gluing does not work. If someone doesn't need it, they can just turn it off. There is an issue where a user creates a theme with a lot of information and wants to put part of the information on the second post after the theme is published, but it is glued together. Can you add an exception rule for gluing the first post when creating a theme? Of course, we can solve this issue by moving the user to another group without this restriction, but if it concerns a normal user? That's where the question comes in. What do you think about it?:unsure:
 
Will this, or can this, addon go back through existing posts and perform auto-merging as configured? Or will it only work/trigger on new posts after addon installation?
 
@Lukas W.

After briefly installing and then un-installing this addon, I now have repeated errors like this:

Code:
Server error log

    ErrorException: Template error: [E_USER_WARNING] Template public:alert_user_post_merged is unknown src/XF/Template/Templater.php:664

    Generated by: {username} Apr 4, 2021 at 11:41 PM

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/{account owner}/...', 664, Array)

#1 src/XF/Template/Templater.php(664): trigger_error('Template public...', 512)

#2 src/XF/Template/Templater.php(1593): XF\Template\Templater->getTemplateData('public', 'alert_user_post...')

#3 src/XF/Alert/AbstractHandler.php(80): XF\Template\Templater->renderTemplate('alert_user_post...', Array)

#4 src/XF/Entity/UserAlert.php(71): XF\Alert\AbstractHandler->render(Object(XF\Entity\UserAlert))

#5 [internal function]: XF\Entity\UserAlert->render()

#6 src/XF/Template/Templater.php(1166): call_user_func_array(Array, Array)

#7 internal_data/code_cache/templates/l1/s6/public/alert_macros.php(43): XF\Template\Templater->method(Object(XF\Entity\UserAlert), 'render', Array)

#8 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)

#9 internal_data/code_cache/templates/l1/s6/public/account_alerts_popup.php(17): XF\Template\Templater->callMacro('alert_macros', 'row', Array, Array)

#10 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)

#11 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('account_alerts_...', Array)

#12 src/XF/Mvc/Renderer/Json.php(84): XF\Template\Template->render()

#13 src/XF/Mvc/Renderer/Json.php(68): XF\Mvc\Renderer\Json->renderHtmlFallback('XF:Account\\Aler...', 'public:account_...', Array)

#14 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Json->renderView('XF:Account\\Aler...', 'public:account_...', Array)

#15 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))

#16 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))

#17 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')

#18 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()

#19 src/XF.php(488): XF\App->run()

#20 index.php(20): XF::runApp('XF\\Pub\\App')

#21 {main}


Request state

array(4) {

  ["url"] => string(195) "/account/alerts-popup?_xfRequestUri=%2Fthreads%2F{thread URL}%2F&_xfWithData=1&_xfToken=1617573622%2Cd590044bc07c724e764d3a2e993e405e&_xfResponseType=json&_=1617594031161"

  ["referrer"] => string(66) "{URL to thread}"

  ["_GET"] => array(5) {

    ["_xfRequestUri"] => string(47) "{URL to thread}"

    ["_xfWithData"] => string(1) "1"

    ["_xfToken"] => string(43) "1617573622,d590044bc07c724e764d3a2e993e405e"

    ["_xfResponseType"] => string(4) "json"

    ["_"] => string(13) "1617594031161"

  }

  ["_POST"] => array(0) {

  }
}

  • I tried reinstalling and then uninstalling again.
  • Files deleted from server.
  • No outdated template warnings.

So how do I fix this?

 
Last edited:
Bump. I know it's a holiday weekend, but devs should at least make sure that their addons uninstall cleanly. 😡

What's the prpotocol for cleaning up after an addon does NOT uninstall properly? Obviously it has modified templates which is has not reverted during the uninstall. How do I figure out what and where?
 
Could you create a ticket and provide login details for us to look at this? Template modifications are entirely handled by XF itself and isn't something we (or any other addon developer) handle during the install or uninstall process, so we'd need to look at what's still set up.
 
Could you create a ticket and provide login details for us to look at this? Template modifications are entirely handled by XF itself and isn't something we (or any other addon developer) handle during the install or uninstall process, so we'd need to look at what's still set up.
Done. Referenced my post above in this thread. Note that the only way I could find to stop the server errors from spawning was to reinstall the addon but set all groups to NOT double merge.
 
I'd like to have just a blank line/paragraph inserted between the original post and the addition. Can I do that myself? At this moment, if I configure the plugin not to insert the bb code line, the text is appended with no space between the old and new, and that's not really neat. Thanks!
I think to add a blank line/paragraph we need to enable the message between merged posts and edit the phrase to be a bb code [/br]

I haven’t exactly figured it out though.
@Lukas W. any chance to achieve this or hard code it into the add-on itself?

I would prefer not to show the [automerge] code too, while not sticking the first line of last reply to the last line of previous message, but separate it just like if it was a new paragraph.

Would that be possible at all? 🙂
 
If you go to ACP > Setup > Options > [TH] Auto Merge Double Post > and disable "Include merge message", and then if you edit src/addons/ThemeHouse/AutoMergeDoublePost/XF/Pub/Controller/Thread.php, and change line 76 from:

PHP:
$mergeMessage = '';

to:

PHP:
$mergeMessage = "\n";

Then it will put a new line between the posts. I can probably release a patch to do this at some point, but it isn't high priority so will just need to make this edit for now.
 
Top Bottom