• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Ignore More by Waindigo [Deleted]

lazy llama

Well-known member
#2
This looks really nice.

I've hit a problem where a server error is thrown if there are no threads to show in the New Posts action:
Code:
ErrorException: Invalid argument supplied for foreach() - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php:15
Generated By: Lazy Llama, 4 minutes ago
Stack Trace
#0 /usr/home/www/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php(15): XenForo_Application::handlePhpError(2, 'Invalid argumen...', '/usr/home/www/f...', 15, Array)
#1 /usr/home/www/forums/library/XenForo/FrontController.php(347): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_FindNew->actionPosts()
#2 /usr/home/www/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#3 /usr/home/www/forums/index.php(13): XenForo_FrontController->run()
#4 {main}
Request State
array(3) {
  ["url"] => string(41) "http://192.168.1.15/forums/find-new/posts"
  ["_GET"] => array(1) {
    ["/forums/find-new/posts"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 

lazy llama

Well-known member
#3
Also getting a number of other errors which all look to be related.
Code:
ErrorException: Argument 1 passed to XenForo_ControllerPublic_Abstract::_getIgnoredContentUserNames() must be of the type array, null given, called in /xxxx/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php on line 23 and defined - library/XenForo/ControllerPublic/Abstract.php:555
Generated By: Lazy Llama, 22 minutes ago
Stack Trace
#0 /xxxx/forums/library/XenForo/ControllerPublic/Abstract.php(555): XenForo_Application::handlePhpError(4096, 'Argument 1 pass...', '/usr/home/www/v...', 555, Array)
#1 /xxxx/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php(23): XenForo_ControllerPublic_Abstract->_getIgnoredContentUserNames(NULL)
#2 /xxxx/forums/library/XenForo/FrontController.php(347): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_FindNew->actionPosts()
#3 /xxxx/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /xxxx/forums/index.php(13): XenForo_FrontController->run()
#5 {main}
Request State
array(3) {
["url"] => string(44) "http://www.xxxx/forums/find-new/posts"
["_GET"] => array(1) {
["/forums/find-new/posts"] => string(0) ""
}
["_POST"] => array(0) {
}
}
Code:
ErrorException: Undefined index: thread_ignore_forum_view - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php:25
Generated By: Unknown Account, 4 minutes ago
Stack Trace
#0 /xxxx/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php(25): XenForo_Application::handlePhpError(8, 'Undefined index...', '/usr/home/www/v...', 25, Array)
#1 /xxxx/forums/library/XenForo/FrontController.php(347): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_Forum->actionForum()
#2 /usr/home/www/vhosts/www.urban75.net/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#3 /xxxx/forums/index.php(13): XenForo_FrontController->run()
#4 {main}
Request State
array(3) {
  ["url"] => string(80) "http://www.xxxx/forums/forums/computers-web-and-general-tech.38/index.rss"
  ["_GET"] => array(1) {
    ["/forums/forums/computers-web-and-general-tech_38/index_rss"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
Code:
ErrorException: Trying to get property of non-object - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php:23
Generated By: Lazy Llama, 5 minutes ago
Stack Trace
#0 /xxxx/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php(23): XenForo_Application::handlePhpError(8, 'Trying to get p...', '/usr/home/www/v...', 23, Array)
#1 /xxxx/forums/library/XenForo/FrontController.php(347): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_FindNew->actionPosts()
#2 /xxxx/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#3 /xxxx/forums/index.php(13): XenForo_FrontController->run()
#4 {main}
Request State
array(3) {
  ["url"] => string(44) "http://www.xxxx/forums/find-new/posts"
  ["_GET"] => array(1) {
    ["/forums/find-new/posts"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
Code:
ErrorException: Undefined property: XenForo_ControllerResponse_Redirect::$subView - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php:23
Generated By: Lazy Llama, 8 minutes ago
Stack Trace
#0 /xxxx/forums/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php(23): XenForo_Application::handlePhpError(8, 'Undefined prope...', '/usr/home/www/v...', 23, Array)
#1 /xxxx/forums/library/XenForo/FrontController.php(347): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_FindNew->actionPosts()
#2 /xxxx/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#3 /xxxx/forums/index.php(13): XenForo_FrontController->run()
#4 {main}
Request State
array(3) {
  ["url"] => string(44) "http://www.xxxx/forums/find-new/posts"
  ["_GET"] => array(1) {
    ["/forums/find-new/posts"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
This is with XenForo 1.3.3 and EnhancedSearch 1.1.0
 
Last edited:

lazy llama

Well-known member
#4
Hi @Waindigo
I think I've found the source of the problems listed above.

In library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/FindNew.php there are two issues:
1) if the parent action returns a redirect the code fails as it tries to fill in ignoredNames from threads that don't exist
2) if the parent action returns an empty result the code fails as it tries to process the non-existent threads.

I've changed this code in that file:
PHP:
        $response = parent::actionPosts();

        if ($response instanceof XenForo_ControllerResponse_View) {
            foreach ($response->subView->params['threads'] as &$thread) {
                if ($thread['thread_ignore_new_posts'] || $thread['forum_ignore_new_posts']) {
                    $thread['isIgnored'] = true;
                }
            }
        }

        $response->subView->params['ignoredNames'] = $this->_getIgnoredContentUserNames(
            $response->subView->params['threads']);

        return $response;
to
PHP:
        $response = parent::actionPosts();

        if ($response instanceof XenForo_ControllerResponse_View) {
            if (strcmp($response->subView->viewName,"XenForo_ViewPublic_FindNew_PostsNone") !==0 ) {
            foreach ($response->subView->params['threads'] as &$thread) {
                if ($thread['thread_ignore_new_posts'] || $thread['forum_ignore_new_posts']) {
                    $thread['isIgnored'] = true;
                }
            }
         

            $response->subView->params['ignoredNames'] = $this->_getIgnoredContentUserNames(
                $response->subView->params['threads']);
            }
        }
        return $response;
That seems to work.

Basically, moved the "ignoredNames" processing inside the 'if' and check that the viewName isn't "...PostsNone". Probably not elegant but...

Still getting unknown index for thread_ignore_new_posts and forum_ignore_new_posts though, so I'll keep looking.
 
Last edited:

Jon W

Well-known member
#5

Rambro

Well-known member
#12
@Waindigo I installed this to try it out and it seems great, but the options on mobile are the first ones listed on the nav bar and have moved New Posts down to the dropdown menu. Any way to shuffle around the display order?
 

Ludachris

Well-known member
#13
Suggestion for this plugin - ability to ignore an entire usergroup. Let's say you have a usergroup consisting of longtime members and they are annoyed with all of the duplicate questions they've seen hundreds/thousands of times before, which usually get posted by newer members that belong to an "entry level" usergroup. It would be really nice to allow them the ability to ignore that entire usergroup and not be subjected to their posts. Of course, there would need to be permissions built in to specify which usergroups can be ignored and which ones couldn't, as well as which usergroups have permission to use the feature.
 

Ludachris

Well-known member
#14
Found this error in the server logs from last night:

Code:
ErrorException: Undefined index: thread_ignore_forum_view - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php:47
Generated By: Unknown Account, Yesterday at 2:32 AM
Stack Trace
#0 /home/site/public_html/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php(47): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/dsmtuner/...', 47, Array)
#1 /home/site/public_html/library/Waindigo/CustomFields/Extend/XenForo/ControllerPublic/Forum.php(29): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_Forum->actionForum()
#2 /home/site/public_html/library/EWRporta/ControllerPublic/Forum.php(23): Waindigo_CustomFields_Extend_XenForo_ControllerPublic_Forum->actionForum()
#3 /home/site/public_html/library/XenForo/FrontController.php(347): EWRporta_ControllerPublic_Forum->actionForum()
#4 /home/site/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /home/site/public_html/index.php(13): XenForo_FrontController->run()
#6 {main}
Request State
array(3) {
["url"] => string(73) "http://www.dsmtuners.com/forum/articles-parts-feedback-reviews.47/page-13"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
I tried using the Ignore feature on that page and had no issues. I couldn't reproduce the issue.
 

Ludachris

Well-known member
#18
Don't know that this plugin is causing the error, but I figured I'd ask here anyway... any ideas what the problem is?

Code:
Server Error Log
Error Info
ErrorException: Undefined index: thread_ignore_forum_view - library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php:47
Generated By: Unknown Account, Dec 2, 2014
Stack Trace
#0 /home/site/public_html/library/Waindigo/IgnoreMore/Extend/XenForo/ControllerPublic/Forum.php(47): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/site/...', 47, Array)
#1 /home/site/public_html/library/Waindigo/CustomFields/Extend/XenForo/ControllerPublic/Forum.php(29): Waindigo_IgnoreMore_Extend_XenForo_ControllerPublic_Forum->actionForum()
#2 /home/site/public_html/library/EWRporta/ControllerPublic/Forum.php(23): Waindigo_CustomFields_Extend_XenForo_ControllerPublic_Forum->actionForum()
#3 /home/site/public_html/library/NFLJ/Showcase/ControllerPublic/Forum.php(257): EWRporta_ControllerPublic_Forum->actionForum()
#4 /home/site/public_html/library/XenForo/FrontController.php(347): NFLJ_Showcase_ControllerPublic_Forum->actionForum()
#5 /home/site/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /home/site/public_html/index.php(13): XenForo_FrontController->run()
#7 {main}
Request State
array(3) {
["url"] => string(73) "http://www.dsmtuners.com/forum/articles-parts-feedback-reviews.47/page-11"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
I checked the page and can't find anything wrong with it.
 

Jon W

Well-known member
#19
Jon W updated Ignore More by Waindigo with a new update entry:

Version 1.1.0 released

New features:
  • Added new option to "Allow 'Show Ignored Content' on New Posts", which is disabled by default. This makes the ignoring on the New Posts page consistent with the ignoring of users on this page and makes this add-on more like the Ignore New Posts by Waindigo add-on.
  • Added options to move the 'Ignored Threads' and 'Ignored Forums' links in the navigation or remove them completely.
  • Added support for the Unread Post Count add-on. Note that this add-on doesn't...
Read the rest of this update entry...