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 pleaseIf 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.
Quote from lheinc on October 4, 2023, 01:10I 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...
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...
Quote from Pablo Borysenco on October 4, 2023, 11:53Hello
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
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
Quote from lheinc on October 4, 2023, 15:05I 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.
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.
Quote from Pablo Borysenco on October 5, 2023, 17:01hello
Please do a test
I disabled this plugin - https://share.pluginus.net/image/i20231005180142.png
hello
Please do a test
I disabled this plugin - https://share.pluginus.net/image/i20231005180142.png
Quote from lheinc on October 5, 2023, 18:15That 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!
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!
Quote from lheinc on October 5, 2023, 21:59I 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.:
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 );
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 );
Quote from Pablo Borysenco on October 6, 2023, 12:13Hello
OK! Thank you for your cooperation
Hello
OK! Thank you for your cooperation