• normadize

    (@normadize)


    Hi,

    Nice effort. You may however want to correct the many notices and deprecated function calls that this plugin causes. The usual is to make error_reporting = E_ALL and use the xdebug PHP extension so that you see the full call stack for errors. Below is what I get (many show in both wp-admin and the website) — please don’t use @ to suppress them, even though it’s tempting (@ also causes some perf penalty by the way)

    Beneath each post in Posts in wp-admin:
    Notice: Undefined index: path in /WWWROOT/wp-content/plugins/enhanced-custom-permalinks/enh-custom-permalinks.php on line 326

    For all wp-admin pages:

    Notice: has_cap was called with an argument that is <strong>deprecated</strong> since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /WWWROOT/wp-includes/functions.php on line 3006
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0008	344912	{main}( )	../edit.php:0
    2	0.0016	403352	require_once( '/WWWROOT/wp-admin/admin.php' )	../edit.php:10
    3	0.4487	34541560	require( '/WWWROOT/wp-admin/menu.php' )	../admin.php:120
    4	0.4518	34661272	require_once( '/WWWROOT/wp-admin/includes/menu.php' )	../menu.php:248
    5	0.4542	34665160	do_action( )	../menu.php:97
    6	0.4571	34691464	call_user_func_array ( )	../plugin.php:429
    7	0.4571	34691536	custom_permalinks_setup_admin( )	../plugin.php:429
    8	0.4571	34691976	add_management_page( )	../enh-custom-permalinks.php:858
    9	0.4571	34692024	add_submenu_page( )	../plugin.php:1148
    10	0.4571	34692192	current_user_can( )	../plugin.php:1097
    11	0.4571	34693032	call_user_func_array ( )	../capabilities.php:1350
    12	0.4571	34693368	WP_User->has_cap( )	../capabilities.php:1350
    13	0.4572	34693656	_deprecated_argument( )	../capabilities.php:950
    14	0.4572	34694144	trigger_error ( )	../functions.php:3006

    Notice: Undefined index: fp in /WWWROOT/wp-content/plugins/enhanced-custom-permalinks/enh-custom-permalinks.php on line 208

    Notice: Undefined index: preview_id in /WWWROOT/wp-content/plugins/enhanced-custom-permalinks/enh-custom-permalinks.php on line 214

    Notice: Undefined index: fp in /WWWROOT/wp-content/plugins/enhanced-custom-permalinks/enh-custom-permalinks.php on line 138

    Notice: Undefined index: preview_id in /WWWROOT/wp-content/plugins/enhanced-custom-permalinks/enh-custom-permalinks.php on line 144

    https://wordpress.org/plugins/enhanced-custom-permalinks/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter normadize

    (@normadize)

    Some more:

    Notice: Undefined index: path in /WWWROOT/wp-content/plugins/enhanced-custom-permalinks/enh-custom-permalinks.php on line 331

    Notice: Undefined variable: idList in /WWWROOT/wp-content/plugins/enhanced-custom-permalinks/enh-custom-permalinks.php on line 173

    Notice: Trying to get property of non-object in /WWWROOT/wp-includes/post-template.php on line 29
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0011	388864	{main}( )	../plugins.php:0
    2	0.5989	35537704	require_once( '/WWWROOT/wp-admin/admin-header.php' )	../plugins.php:361
    3	0.6094	35600008	do_action( )	../admin-header.php:122
    4	0.6094	35602528	call_user_func_array ( )	../plugin.php:429
    5	0.6097	35602616	custom_permalink_trigger_conflict_check( )	../plugin.php:429
    6	0.6097	35602824	get_the_ID( )	../enh-custom-permalinks.php:504
    Notice: Trying to get property of non-object in /WWWROOT/wp-includes/post-template.php on line 29
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0011	388864	{main}( )	../plugins.php:0
    2	0.5989	35537704	require_once( '/WWWROOT/wp-admin/admin-header.php' )	../plugins.php:361
    3	0.6094	35600008	do_action( )	../admin-header.php:122
    4	0.6094	35602528	call_user_func_array ( )	../plugin.php:429
    5	0.6097	35602616	custom_permalink_trigger_conflict_check( )	../plugin.php:429
    6	0.6098	35603200	get_the_ID( )	../enh-custom-permalinks.php:505
    Thread Starter normadize

    (@normadize)

    In addition, when developing it’s always a good idea to set define('WP_DEBUG', true); in wp-config.php so that you can see the errors, otherwise WP disables error_reporting in the code, which overrides the php.ini or .htaccess settings.

    In any case, this is a great plugin. I hope you’ll be able to keep it updated! Thanks again for all the effort.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘notices and calls to deprecated functions’ is closed to new replies.