Advanced-Post-List / advanced-post-list

A WordPress plugin to create custom post lists
15 stars 7 forks source link

404 Page Error - Undefined index #55

Closed EkoJR closed 7 years ago

EkoJR commented 8 years ago

An error occurs on a 404 page when APL is being utilized on a sidebar.

Notice: Undefined index: post__not_in in ...\advanced-post-list\includes\class\APLQuery.php on line 437

( ! ) Notice: Undefined index: post__not_in in C:\wamp64\www\APL\wp-content\plugins\advanced-post-list\includes\class\APLQuery.php on line 437

Call Stack
#   Time    Memory  Function    Location
1   0.0000  234800  {main}( )   ...\index.php:0
2   0.0000  237872  require( 'C:\wamp64\www\APL\wp-blog-header.php' )   ...\index.php:17
3   0.2760  26408064    require_once( 'C:\wamp64\www\APL\wp-includes\template-loader.php' ) ...\wp-blog-header.php:19
4   0.2830  26470152    include( 'C:\wamp64\www\APL\wp-content\themes\customizr\index.php' )    ...\template-loader.php:75
5   0.4480  27068176    do_action( )    ...\index.php:18
6   0.4480  27070232    call_user_func_array:{C:\wamp64\www\APL\wp-includes\plugin.php:525} ( ) ...\plugin.php:525
7   0.4480  27070504    TC_sidebar->tc_sidebar_display( )   ...\plugin.php:525
8   0.4490  27095080    get_sidebar( )  ...\class-content-sidebar.php:98
9   0.4490  27095888    locate_template( )  ...\general-template.php:122
10  0.4500  27096064    load_template( )    ...\template.php:531
11  0.4540  27109752    require_once( 'C:\wamp64\www\APL\wp-content\themes\customizr\sidebar-left.php' )    ...\template.php:572
12  0.4540  27110024    dynamic_sidebar( )  ...\sidebar-left.php:10
13  0.4570  27115000    call_user_func_array:{C:\wamp64\www\APL\wp-includes\widgets.php:738} ( )    ...\widgets.php:738
14  0.4570  27115584    WP_Widget->display_callback( )  ...\widgets.php:738
15  0.4570  27116840    APLWidget->widget( )    ...\class-wp-widget.php:376
16  0.4570  27120368    APLCore->APL_display( ) ...\APLWidget.php:25
17  0.4570  27120792    APLCore->APL_run( ) ...\APLCore.php:1893
18  0.4580  27194112    APLQuery->__construct( )    ...\APLCore.php:1973
19  0.4580  27195128    APLQuery->set_query( )  ...\APLQuery.php:87
20  0.4580  27201320    APLQuery->set_query_base_val( ) ...\APLQuery.php:299

How to (Possibly) Reproduce

  1. Create and add an APL Preset to the Sidebar/Widget.
  2. Go to a Page that produces a 404 Error.
EkoJR commented 7 years ago

Better default handling has been added, and function has shifted to an alternate function all together.