• Resolved Mike Meinz

    (@mikemeinz)


    Undefined index error in log when WordPress debugging is enabled.

    define(‘WP_DEBUG’, true);
    define(‘WP_DEBUG_LOG’, true);
    define( ‘SCRIPT_DEBUG’, true);
    define( ‘SAVEQUERIES’, true);

    Stack Trace:

    [19-Jul-2018 15:37:57 UTC] PHP Notice: Undefined index: pagination_bookmarks in C:\wamp\www\XXXXXXX\wp-content\plugins\list-category-posts\include\lcp-catlist.php on line 438

    [19-Jul-2018 15:37:57 UTC] PHP Stack trace:

    [19-Jul-2018 15:37:57 UTC] PHP 1. {main}() C:\wamp\www\XXXXXXX\index.php:0

    [19-Jul-2018 15:37:57 UTC] PHP 2. require() C:\wamp\www\XXXXXXX\index.php:17

    [19-Jul-2018 15:37:57 UTC] PHP 3. require_once() C:\wamp\www\XXXXXXX\wp-blog-header.php:19

    [19-Jul-2018 15:37:57 UTC] PHP 4. include() C:\wamp\www\XXXXXXX\wp-includes\template-loader.php:74

    [19-Jul-2018 15:37:57 UTC] PHP 5. get_sidebar() C:\wamp\www\XXXXXXX\wp-content\themes\eastlyme\single.php:69

    [19-Jul-2018 15:37:57 UTC] PHP 6. locate_template() C:\wamp\www\XXXXXXX\wp-includes\general-template.php:110

    [19-Jul-2018 15:37:57 UTC] PHP 7. load_template() C:\wamp\www\XXXXXXX\wp-includes\template.php:647

    [19-Jul-2018 15:37:57 UTC] PHP 8. require_once() C:\wamp\www\XXXXXXX\wp-includes\template.php:688

    [19-Jul-2018 15:37:57 UTC] PHP 9. dynamic_sidebar() C:\wamp\www\XXXXXXX\wp-content\themes\eastlyme\sidebar-firstselectman.php:14

    [19-Jul-2018 15:37:57 UTC] PHP 10. WP_Widget->display_callback() C:\wamp\www\XXXXXXX\wp-includes\widgets.php:743

    [19-Jul-2018 15:37:57 UTC] PHP 11. ListCategoryPostsWidget->widget() C:\wamp\www\XXXXXXX\wp-includes\class-wp-widget.php:372

    [19-Jul-2018 15:37:57 UTC] PHP 12. CatListDisplayer->display() C:\wamp\www\XXXXXXX\wp-content\plugins\list-category-posts\include\lcp-widget.php:82

    [19-Jul-2018 15:37:57 UTC] PHP 13. CatListDisplayer->select_template() C:\wamp\www\XXXXXXX\wp-content\plugins\list-category-posts\include\lcp-catlistdisplayer.php:30

    [19-Jul-2018 15:37:57 UTC] PHP 14. CatListDisplayer->template() C:\wamp\www\XXXXXXX\wp-content\plugins\list-category-posts\include\lcp-catlistdisplayer.php:45

    [19-Jul-2018 15:37:57 UTC] PHP 15. CatListDisplayer->build_output() C:\wamp\www\XXXXXXX\wp-content\plugins\list-category-posts\include\lcp-catlistdisplayer.php:80

    [19-Jul-2018 15:37:57 UTC] PHP 16. CatList->get_pagination() C:\wamp\www\XXXXXXX\wp-content\plugins\list-category-posts\include\lcp-catlistdisplayer.php:154

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Mike Meinz

    (@mikemeinz)

    I replaced public function get_pagination() in lcp-catlist.php with the following to remove the error. I don’t know if this will work for everyone or if it is the correct solution overall but it worked for me.

      public function get_pagination(){
    	if (array_key_exists('pagination_bookmarks',$this->params)) {
    		$pgb=$this->params['pagination_bookmarks'];
    	} else {
    		$pgb='no';
    	}
        $paginator_params = array(
              'instance'    => $this->get_instance(),
              'next'        => $this->params['pagination_next'],
              'numberposts' => $this->get_number_posts(),
              'page'        => $this->get_page(),
              'pagination'  => $this->params['pagination'],
              'posts_count' => $this->get_posts_count(),
              'previous'    => $this->params['pagination_prev'],
              'bookmarks'   => $pgb
        );
        return LcpPaginator::get_instance()->get_pagination($paginator_params);
      }
    • This reply was modified 6 years, 4 months ago by Mike Meinz.
    Plugin Contributor zymeth25

    (@zymeth25)

    Thread Starter Mike Meinz

    (@mikemeinz)

    Which version number includes this fix?

    Plugin Contributor zymeth25

    (@zymeth25)

    Fixed in 0.78.1

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Undefined index: pagination_bookmarks’ is closed to new replies.