Forums Forums Search & Filter Pro Rewrite Issue

Viewing 10 posts - 1 through 10 (of 17 total)
  • Anonymous
    #141361

    I have a custom taxonomy with a hierarchal rewrite rule. The taxonomy is set to a hierarchical dropdown and include child terms. When I select a child term, the form submits and the child term slug is replaced with the previous parent terms child from the dropdown. Example:
    Select List:
    Blood Pressure
    –Massage Oils
    Blood Sugar
    — Glucose Monitors

    Selecting Blood Sugar
    https://shop.lifespa.com/health-topic/blood-sugar/
    Selecting Blood Sugar/Glucose Monitors
    https://shop.lifespa.com/health-topic/blood-sugar/%5B0%5D-massage-oils/

    Its a very odd behavior, I also see the index value in the html li element
    li class=”sf-field-taxonomy-health-topic” data-sf-field-name=”_sft_health-topic” data-sf-field-type=”taxonomy” data-sf-field-input-type=”select” data-sf-combobox=”1″ data-sf-term-rewrite=”["https:\/\/shop.lifespa.com\/health-topic\/[0]\/","https:\/\/shop.lifespa.com\/health-topic\/[0]\/[0]-massage-oils\/"]” data-sf-taxonomy-archive=”1″

    Trevor
    #141377
    This reply has been marked as private.
    Anonymous
    #141400
    This reply has been marked as private.
    Anonymous
    #141402
    This reply has been marked as private.
    Trevor
    #141553
    This reply has been marked as private.
    Anonymous
    #143126

    The custom taxonomy is written in a custom plugin/

    //* Add custom taxonomies
    //* Define Constants
    define( 'PT_WOO', 'product' );
    if ( ! function_exists( 'gum_woo_register_tax_product_health_topic' ) ) {
    
    	// Register Custom Custom_Taxonomy
    	function gum_woo_register_tax_product_health_topic() {
    		$ctax_name = 'Health Topic';
    		$ctax_plural = 'Health Topics';
    		
    		$labels = array(
    			'name'                       => _x( $ctax_plural, 'gumtheme' ),
    			'singular_name'              => _x( $ctax_name, 'gumtheme' ),
    			'menu_name'                  => __( $ctax_plural, 'gumtheme' ),
    			'all_items'                  => __( 'All '.$ctax_plural, 'gumtheme' ),
    			'parent_item'                => __( 'Parent '.$ctax_name, 'gumtheme' ),
    			'parent_item_colon'          => __( 'Parent '.$ctax_name.':', 'gumtheme' ),
    			'new_item_name'              => __( 'New '.$ctax_name, 'gumtheme' ),
    			'add_new_item'               => __( 'Add New '.$ctax_name, 'gumtheme' ),
    			'edit_item'                  => __( 'Edit '.$ctax_name, 'gumtheme' ),
    			'update_item'                => __( 'Update '.$ctax_name, 'gumtheme' ),
    			'separate_items_with_commas' => __( 'Separate '.$ctax_plural.' with commas', 'gumtheme' ),
    			'search_items'               => __( 'Search '.$ctax_plural, 'gumtheme' ),
    			'add_or_remove_items'        => __( 'Add or remove '.$ctax_plural, 'gumtheme' ),
    			'choose_from_most_used'      => __( 'Choose from the most used '.$ctax_plural, 'gumtheme' ),
    			'not_found'                  => __( 'No '.$ctax_name.' Found', 'gumtheme' ),
    		);
    		
    		$args = array(
    			'labels'                     => $labels,
    			'hierarchical'               => true,
    			'public'                     => true,
    			'show_ui'                    => true,
    			'show_admin_column'          => true,
    			'show_in_nav_menus'          => true,
    			'show_tagcloud'              => false,
    			//'has_archive'         		 => true,
    			//'exclude_from_search'		 => false,
    			//'publicly_queryable'  		 => true,
    			
    			'rewrite' => array(
    		        'slug' => 'health-topic',
    		        'with_front' => false,
    		        'hierarchical' => true // to display taxonomy/term
    		    ),
    		    
    		);
    		
    		register_taxonomy( 'health-topic', PT_WOO, $args );
    	
    	}
    	
    	// Hook into the 'init' action
    	add_action( 'init', 'gum_woo_register_tax_product_health_topic', 1 );
    
    } //end if
    Anonymous
    #143128

    The issue seems to be definite rewrite issue in the <li> data

    data-sf-term-rewrite="["https:\/\/staging.store.lifespa.com\/health-topic\/[0]\/","https:\/\/staging.store.lifespa.com\/health-topic\/[0]\/[0]-massage-oils\/"]"
    

    Where [0]-massage-oils should be [1]

    Also, may be related?

    If I use the Woo Shop Page for results vs the Post Type Archive, I get the following Undefined variable: enable_taxonomy_archives in ..wp-content/plugins/search-filter-pro/public/includes/class-search-filter-query.php on line 1257

    Trevor
    #143165
    This reply has been marked as private.
    Ross Moderator
    #143835
    This reply has been marked as private.
    Ross Moderator
    #144691
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 17 total)