Title: Save problem
Last modified: October 4, 2018

---

# Save problem

 *  Resolved [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/)
 * Hello,
 * I can not save my settings on the “Post Types” tab.
 * Here is the mistake I have:
    “The following settings were not saved: apost_product_root
   bpost_product_archive_display”
 * I tried to uninstall and reinstall the plugin, this does not solve the problem.
    -  This topic was modified 7 years, 7 months ago by [meneldil](https://wordpress.org/support/users/meneldil/).

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10753734)
 * If you don’t mind, can you tell me what hook the `product` CPT is registered 
   in? I think I know what is going on, but want confirmation as to when the CPT
   is registered.
 *  Thread Starter [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10753756)
 * Hi John,
 * Are you talking about that?
    `add_action( 'init', 'cpt_product', 0 );`
 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10753786)
 * That would be it. Looks like it is probably running after the period of time 
   the plugin checks for CPTs (as I had thought), I’m tracking this bug here: [https://github.com/mtekk/Breadcrumb-NavXT/issues/210](https://github.com/mtekk/Breadcrumb-NavXT/issues/210)
 *  Thread Starter [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10753861)
 * So for the moment, impossible to fix the problem?
 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10800282)
 * So, looking into this, I’m unfortunately having issues reproducing it locally.
   The only thing I can get to show up is warnings on the frontend if the priority
   of the `add_action` call on the `init` action is at 11 or “lower” (any number
   greater than 10). Is your call to `add_action` in a plugin, or somewhere else?
   Is it running within a function that hooks into an action? If so what action?
    -  This reply was modified 7 years, 7 months ago by [John Havlik](https://wordpress.org/support/users/mtekk/).
 *  Thread Starter [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10800523)
 * The code is in “functions.php”.
 * Here is my code:
 *     ```
       function cpt_product() {
   
       	$labels = array(
       		'name'                  => 'Products',
       		'singular_name'         => 'Products',
       		'menu_name'             => 'Products',
       		'name_admin_bar'        => 'Products',
       		'all_items'             => 'All Products',
       		'add_new_item'          => 'Add New Product',
       		'add_new'               => 'Add New',
       		'new_item'              => 'New Product',
       		'edit_item'             => 'Edit Product',
       		'update_item'           => 'Update Product',
       		'view_item'             => 'View Product',
       		'view_items'            => 'View Products',
       		'search_items'          => 'Search Product',
       	);
       	$rewrite = array(
       		'slug'                  => 'product',
       		'with_front'            => true,
       		'pages'                 => true,
       		'feeds'                 => true,
       	);
       	$args = array(
       		'label'                 => 'Product',
       		'description'           => 'Products',
       		'labels'                => $labels,
       		'supports'              => array( 'title', 'thumbnail' ),
       		'hierarchical'          => true,
       		'public'                => true,
       		'show_ui'               => true,
       		'show_in_menu'          => true,
       		'menu_position'         => 20,
       		'menu_icon'             => 'dashicons-products',
       		'show_in_admin_bar'     => true,
       		'show_in_nav_menus'     => true,
       		'can_export'            => true,
       		'has_archive'           => 'product',
       		'exclude_from_search'   => false,
       		'publicly_queryable'    => true,
       		'rewrite'               => $rewrite,
       		'capability_type'       => 'page',
       	);
       	register_post_type( 'product', $args );
   
       }
       add_action( 'init', 'cpt_product', 0 );
       ```
   
 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10801540)
 * Thanks for that, it looks like there was a bug in the handling for hierarchical
   CPT default settings (I was testing with non-hierarchical CPTs out of convenience
   which is obviously an issue). I’m now able to reproduce this locally and will
   be issuing an update with a fix this week (6.2.1).
 *  Thread Starter [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10801544)
 * Good news!!!
    I look forward. 🙂
 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10801939)
 * There should be a fixed version available up on github now.
 *  Thread Starter [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10802635)
 * Ok, thanks and in WordPress?
 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10822862)
 * Breadcrumb NavXT 6.2.1 was released yesterday (2018-10-26).
 *  Thread Starter [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10823225)
 * It works!
    Thank you so much! 🙂

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Save problem’ is closed to new replies.

 * ![](https://ps.w.org/breadcrumb-navxt/assets/icon.svg?rev=1927103)
 * [Breadcrumb NavXT](https://wordpress.org/plugins/breadcrumb-navxt/)
 * [Support Threads](https://wordpress.org/support/plugin/breadcrumb-navxt/)
 * [Active Topics](https://wordpress.org/support/plugin/breadcrumb-navxt/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/breadcrumb-navxt/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/breadcrumb-navxt/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [meneldil](https://wordpress.org/support/users/meneldil/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/save-problem/#post-10823225)
 * Status: resolved