PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Filtered Page shows <title>404</title>

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

I did a"view source" on a filtered page and although the page returned the filtered products, I noticed the page was returning a 404 when looking at the page code/html.  I do not know if this is expected, okay, or showing something wrong so i thought I would reach out to get your opinion.  In addition, I see two different meta entries as well.

 

I have attached a screenshot and provided some access info in the private info area just in case this was something you thought needed to be looked at in more detail.

 

As an example, here's a page where you can select any filter and then look at the source code:  https://www.1800doorbell.com/driveway-alarms/

 

Thanks in advance...

 

 

Hello

Can  I  disable  plugins/theme  to test?

Please  add  ftp access - https://share.pluginus.net/image/i20230222134241.png ->https://share.pluginus.net/image/i20230222134615.png

I pushed this over to a staging site and provided access info in the private area.  -- thank you.  I have disabled the plugin on the live site.

hello

Please do a test

I  disabled this  plugin - https://share.pluginus.net/image/i20231005180142.png

That looks like it was the issue.  I want to go back to the developer of the permalink manager pro and ask him to take a look at this issue.  I rely on the plugin extensively on the live site.  Do you have any feedback I can provide to him that might point him in the right direction to avoid this conflict?  Thank you by the way!

I wanted to follow you to let you know the Permalinks Manager Pro developer provided a solution and it seems to have fixed the issue.  In case you are interested:

*******************his response********************************************************************

The problem here is that the HUSKY plugin uses its own algorithm to parse the product URLs that interfere with the detect functions used by my plugin. As long as Permalink Manager is deactivated, the product categories URLs are prefixed with /product-cat/, e.g.:

 

https://kmtj7at8uf-staging.onrocket.site/product-cat/driveway-alarms/swoof/best-use-home-use/compatibility-dakota-alert-4000-series/

 

HUSKY is able to detect them as product categories and modify the products' query. When PMP (Permalinks Manager Pro) is activated, this function no longer works, because the product category permalink format is changed (there is no /product-cat/ base included). To put it simply, WordPress recognizes such URLs as regular post categories, not product categories.

I cannot guarantee that this is going to work in long-term, but you can programmatically manipulate the query (check if a product category with such slug exists, and if so, replace 'category_name' with 'product_cat'):

 

Here is the code snippet:

https://kmtj7at8uf-staging.onrocket.site/wp-admin/admin.php?page=edit-snippet&id=42

 

function bis_adjust_product_cat_query( $query, $old_query, $uri_parts, $pm_query, $content_type, $element_object ) {
if ( ! empty( $query['category_name'] ) ) {
$category_slug = preg_replace( '/^([^\/]+)(.*)/', '$1', $query['category_name'] );

$category = get_term_by( 'slug', $category_slug, 'product_cat' );

if ( $category ) {
unset( $query['category_name'] );
$query['product_cat'] = $category->slug;
}
}

return $query;
}
add_filter( 'permalink_manager_filter_query', 'bis_adjust_product_cat_query', 5, 6 );

Hello

OK!  Thank you for your cooperation