• On first creation of a new CPT entry the editor throws an error above each custom post type form entry point, reading something like

    Notice: Undefined index: default in C:\xampp\htdocs\scevent\wp-content\plugins\super-cpt\includes\class-super-custom-post-meta.php on line 298

    Once a new post is saved even if it only includes the title line than on revisiting the item in the editor the notice disappears.

    Is there a workaround or hot fix? him

    https://www.ads-software.com/plugins/super-cpt/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Got the same error. Here is my script:

    $eventos->add_meta_box( array(
    				'id' => 'info',
    				'context' => 'normal',
    				'fields' => array(
    					'data_fim' => array( 'label' => 'Data fim', 'type' => 'date'),
    					'tipo' => array( 'label' => 'Tipo', 'type' => 'text'),
    					'local' => array( 'label' => 'Local', 'type' => 'text'),
    					'site' => array( 'label' => 'Site', 'type' => 'text')
    				)
    			) );

    So, I’ve had the same problem and finally remembered that I had switched WP_DEBUG to true. If you switch the debug to false, all the notices will disappear. I hope this helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Notice when creating new CPT entries’ is closed to new replies.