WordPress.org

Ready to get started?Download WordPress

Forums

Just Custom Fields
PHP Notice: Undefined index: justcustomfields_noncename (1 post)

  1. benoit.borrel
    Member
    Posted 1 year ago #

    Hi,

    Using WP 3.4.1 + theme Twentyten + plugin JCF 1.3.4.

    When adding a Custom Links to a menu, I got the following PHP Notice:
    PHP Notice: Undefined index: justcustomfields_noncename in ./wp-content/plugins/just-custom-fields/inc/functions.post.php on line 87

    With the following stack trace:
    PHP Stack trace:
    PHP 1. {main}() ./wp-admin/admin-ajax.php:0
    PHP 2. do_action() ./wp-admin/admin-ajax.php:66
    PHP 3. call_user_func_array() ./wp-includes/plugin.php:403
    PHP 4. wp_ajax_add_menu_item() ./wp-includes/plugin.php:0
    PHP 5. wp_save_nav_menu_items() ./wp-admin/includes/ajax-actions.php:889
    PHP 6. wp_update_nav_menu_item() ./wp-admin/includes/nav-menu.php:1023
    PHP 7. wp_insert_post() ./wp-includes/nav-menu.php:360
    PHP 8. do_action() ./wp-includes/post.php:2698
    PHP 9. call_user_func_array() ./wp-includes/plugin.php:403
    PHP 10. jcf_post_save_custom_fields() ./wp-includes/plugin.php:0

    Applying the following patch to inc/functions.post.php fixed the issue:

    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    --- <html>functions.post.php (<b>Yesterday 13:22:52</b>)</html>
    +++ <html><b>Current File</b></html>
    @@ -84,7 +84,7 @@
    
     		// verify this came from the our screen and with proper authorization,
     		// because save_post can be triggered at other times
    -		if ( !wp_verify_nonce( $_POST['justcustomfields_noncename'], plugin_basename( __FILE__ ) ) )
    \ No newline at end of file
    +		if ( !isset( $_POST['justcustomfieldsn_oncename'] ) OR !wp_verify_nonce( $_POST['justcustomfields_noncename'], plugin_basename( __FILE__ ) ) )
    \ No newline at end of file
     			return;
    
     		// check permissions

    http://wordpress.org/extend/plugins/just-custom-fields/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.