Ignore Content

Ignore Content [Paid] 3.1.6

No permission to buy ($30.00)

Xon

Well-known member
The ignore import feature doesn't gracefully handle duplicates, and it allows ignoring staff (or any other accounts which should not be ignored).

For example;
Code:
MySQL query error [1062]: Duplicate entry '1-2' for key 'PRIMARY'
INSERT  INTO `xf_user_ignored` (`user_id`, `ignored_user_id`) VALUES (1,2),
(1,2)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(274): XF\Db\AbstractAdapter->query('INSERT  INTO `x...')
#4 src/addons/Truonglv/IgnoreContent/Service/Importer.php(127): XF\Db\AbstractAdapter->insertBulk('xf_user_ignored', Array)
#5 src/addons/Truonglv/IgnoreContent/Pub/Controller/Ignore.php(160): Truonglv\IgnoreContent\Service\Importer->import()
#6 src/XF/Mvc/Dispatcher.php(350): Truonglv\IgnoreContent\Pub\Controller\Ignore->actionImport(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('Truonglv\\Ignore...', 'Import', Object(XF\Mvc\RouteMatch), Object(Truonglv\IgnoreContent\Pub\Controller\Ignore), NULL)
#8 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Truonglv\IgnoreContent\Pub\Controller\Ignore), NULL)
#9 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2344): XF\Mvc\Dispatcher->run()
#11 src/XF.php(512): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
 

Xon

Well-known member
@truonglv if user A has already ignored user B, then imports a csv which contains that user B it will fail to insert that CSV and rollback.

The fix for this isn't that complicated; use the IGNORE modifier.
PHP:
$db->insertBulk('xf_user_ignored', $userIgnoredRows);
to
PHP:
$db->insertBulk('xf_user_ignored', $userIgnoredRows, false, false, 'IGNORE');
 

Radikus

Member
Found a huge problem, is it really intended function that "unread posts" icon turns on even if there's new posts only in ignored threads?

This is a huge deal breaker for me and my users, we have no use for this at all.

So you're not going to fix this or comment on it?
 

truonglv

Well-known member
Found a huge problem, is it really intended function that "unread posts" icon turns on even if there's new posts only in ignored threads?

This is a huge deal breaker for me and my users, we have no use for this at all.
Where is icon show?
 

Radikus

Member
Where is icon show?

I mean the icons that are on main page, left side of forums.

There's icon for when everything has been read, and when there's something unread.

It always turns to "unread" mode even if only ignored threads have new messages. My users complain about this all the time, it messes up the way they use the forum.

On my board they turn blue.

Unread.png
 

Mr. Jinx

Well-known member
I know what you mean, although it does not bother me that much.

To clarify for @truonglv :

1628092695659.png

The forum Overige - Chat shows that it has new posts, but these are from ignored threads. So in fact, this forum should not look like it has new posts.
 

webbouk

Well-known member
Technically it's right as it is - there are new posts in the node but the user has chosen to ignore them.
If the user sees the icon to indicate there are new posts but cannot see them, then the user needs educating that the reason why is because they have chosen to ignore the thread/poster
 

Radikus

Member
Technically it's right as it is - there are new posts in the node but the user has chosen to ignore them.
If the user sees the icon to indicate there are new posts but cannot see them, then the user needs educating that the reason why is because they have chosen to ignore the thread/poster

But my users ignore them for a reason. They do not want to see them ever, and want no useless notifications from them.

And now they click the unread icon forum link multiple times every day only to find out there was nothing of interest.

I find it really hard to believe that only my users think this way. This is basic UI design. You do not gain ANYTHING to be notified that there's posts that you don't want to read and don't want to see. It only adds confusion and useless clicks and makes a horrible unintuitive user experience.
 

webbouk

Well-known member
But my users ignore them for a reason. They do not want to see them ever, and want no useless notifications from them.

So are you running a community forum as it doesn't sound to be a good community spirit?

If my members were ignoring other members in significant quantities I'd want to know why and would ask myself what I am doing wrong.
 

Radikus

Member
So are you running a community forum as it doesn't sound to be a good community spirit?

If my members were ignoring other members in significant quantities I'd want to know why and would ask myself what I am doing wrong.

What are you talking about? This is not about ignoring users, but ignoring certain threads that are not interesting for some reason.

Totally normal in my mind.
 

Mr. Jinx

Well-known member
The new cache function doesn't work for me.
After I switch to "XenForo cache setup" and rebuild the cache, the ignored items just show up like they are not ignored any more.

I'm using Redis with Xon's Redis addon.
 

truonglv

Well-known member
The new cache function doesn't work for me.
After I switch to "XenForo cache setup" and rebuild the cache, the ignored items just show up like they are not ignored any more.

I'm using Redis with Xon's Redis addon.
I have looked his add-on and seem it's does not support save multiple items at once.
 

Radikus

Member

This is one step for the better, so thanks for that.

But if someone posts anything else now (and you read it), and the ignored thread is not the newest, it still shows the unread icon then, when the only unread thread is ignored one.

So it helps only when ignored thread is the newest one. Unread icon should only be lit when you have unread threads that are not ignored.
 

Mr Lucky

Well-known member
Thanks for quick action.

may be conflict with @Xon Conversation Essesntials or @mazzly AMP addon though:

Code:
Error: Macro public:tic_ignore_content_macros :: ignore_button() error: Call to undefined method SV\ConversationEssentials\XF\Entity\User::canTICIgnoreContent() src/addons/Truonglv/IgnoreContent/Callback.php:103
Generated by: Unknown account Aug 10, 2021 at 2:50 PM
Stack trace
#0 [internal function]: Truonglv\IgnoreContent\Callback::renderIgnoreButton('', Array, Object(MaZ\AMP\XF\Template\XF22\Templater))
#1 src/XF/Template/Templater.php(1688): call_user_func(Array, '', Array, Object(MaZ\AMP\XF\Template\XF22\Templater))
#2 internal_data/code_cache/templates/l1/s109/public/tic_ignore_content_macros.php(16): XF\Template\Templater->callback('Truonglv\\Ignore...', 'renderIgnoreBut...', '', Array)
#3 src/XF/Template/Templater.php(817): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#4 src/addons/MaZ/AMP/XF/Template/Templater.php(97): XF\Template\Templater->callMacro('tic_ignore_cont...', 'ignore_button', Array, Array, Object(XF\Template\MacroState))
#5 internal_data/code_cache/templates/l1/s109/public/thread_view.php(53): MaZ\AMP\XF\Template\Templater->callMacro('tic_ignore_cont...', 'ignore_button', Array, Array)
#6 src/XF/Template/Templater.php(980): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(916): XF\Template\Templater->renderExtensionInternal('thread_action_b...', Array, Array, Object(XF\Template\ExtensionSet))
#8 internal_data/code_cache/templates/l1/s109/public/thread_view.php(441): XF\Template\Templater->renderExtension('thread_action_b...', Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(980): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(916): XF\Template\Templater->renderExtensionInternal('thread_actions', Array, Array, Object(XF\Template\ExtensionSet))
#11 internal_data/code_cache/templates/l1/s109/public/thread_view.php(915): XF\Template\Templater->renderExtension('thread_actions', Array, Object(XF\Template\ExtensionSet))
#12 src/XF/Template/Templater.php(1644): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#13 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('thread_view', Array, true, NULL)
#14 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:thread_v...', Array)
#15 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#16 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:amp_thre...', Array)
#17 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#18 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#19 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#20 src/XF/App.php(2344): XF\Mvc\Dispatcher->run()
#21 src/XF.php(512): XF\App->run()
#22 index.php(20): XF::runApp('XF\\Pub\\App')
#23 {main}
Request state
array(4) {
  ["url"] => string(35) "/threads/scott-hamilton.2356/?amp=1"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["amp"] => string(1) "1"
  }
  ["_POST"] => array(0) {
  }
}
 
Top