admin管理员组文章数量:1024354
I'm trying to obtain for products and products category the following permalinks structures: .html .html .html
In order to obtain this I have modified the permalink using the following filters and actions:
add_filter( 'request', 'change_requerst_vars_for_product_cat' );
add_filter( 'term_link', 'term_link_filter', 10, 3 );
add_filter( 'post_type_link', 'wpp_remove_slug', 10, 3 );
add_action( 'pre_get_posts', 'wpp_change_request' );
add_action( 'create_term', 'mee_new_product_cat_edit_success', 10, 2 );//fix 404 errors
add_action('init', 'mee_product_category_rewrite_rules');
add_action('wp_insert_post', 'mt_woo_new_product_post_save');//fix 404 errors
add_action('init', 'mt_woo_product_rewrite_rules');
After updating the permalinks from the wordpress admin, on the frontend I obtain the needed permalinks structure, but on the backend I have only one issue.
When trying to do modifications to products I get the following message displayed by google chrome: "This page isn’t working mm.mtgeeks is currently unable to handle this request. HTTP ERROR 500"
After doing some debugging in the wordpress core, I have observed that the product updating process remains blocked in the function wp_insert_post from wp-includes/post.php at line 3962 (do_action( 'wp_insert_post', $post_ID, $post, $update );)
How can I fix this issue? For which purposes is this line of code used?
I've observed that if this line of code is commented out, the updating process is working correctly.
I'm trying to obtain for products and products category the following permalinks structures: https://mm.mtgeeks/product-name.html https://mm.mtgeeks/parent-category-name.html https://mm.mtgeeks/parent-category-name/subcategory-name.html
In order to obtain this I have modified the permalink using the following filters and actions:
add_filter( 'request', 'change_requerst_vars_for_product_cat' );
add_filter( 'term_link', 'term_link_filter', 10, 3 );
add_filter( 'post_type_link', 'wpp_remove_slug', 10, 3 );
add_action( 'pre_get_posts', 'wpp_change_request' );
add_action( 'create_term', 'mee_new_product_cat_edit_success', 10, 2 );//fix 404 errors
add_action('init', 'mee_product_category_rewrite_rules');
add_action('wp_insert_post', 'mt_woo_new_product_post_save');//fix 404 errors
add_action('init', 'mt_woo_product_rewrite_rules');
After updating the permalinks from the wordpress admin, on the frontend I obtain the needed permalinks structure, but on the backend I have only one issue.
When trying to do modifications to products I get the following message displayed by google chrome: "This page isn’t working mm.mtgeeks is currently unable to handle this request. HTTP ERROR 500"
After doing some debugging in the wordpress core, I have observed that the product updating process remains blocked in the function wp_insert_post from wp-includes/post.php at line 3962 (do_action( 'wp_insert_post', $post_ID, $post, $update );)
How can I fix this issue? For which purposes is this line of code used?
I've observed that if this line of code is commented out, the updating process is working correctly.
Share Improve this question edited Mar 25, 2019 at 11:47 mrben522 1,6931 gold badge12 silver badges17 bronze badges asked Mar 24, 2019 at 20:38 MikaDevMikaDev 12 bronze badges1 Answer
Reset to default 0Hmm, I would use the Permalink Manager Lite plugin (free). or it's PRO version ($39): https://permalinkmanager.pro/ Makes life easier :)
I'm trying to obtain for products and products category the following permalinks structures: .html .html .html
In order to obtain this I have modified the permalink using the following filters and actions:
add_filter( 'request', 'change_requerst_vars_for_product_cat' );
add_filter( 'term_link', 'term_link_filter', 10, 3 );
add_filter( 'post_type_link', 'wpp_remove_slug', 10, 3 );
add_action( 'pre_get_posts', 'wpp_change_request' );
add_action( 'create_term', 'mee_new_product_cat_edit_success', 10, 2 );//fix 404 errors
add_action('init', 'mee_product_category_rewrite_rules');
add_action('wp_insert_post', 'mt_woo_new_product_post_save');//fix 404 errors
add_action('init', 'mt_woo_product_rewrite_rules');
After updating the permalinks from the wordpress admin, on the frontend I obtain the needed permalinks structure, but on the backend I have only one issue.
When trying to do modifications to products I get the following message displayed by google chrome: "This page isn’t working mm.mtgeeks is currently unable to handle this request. HTTP ERROR 500"
After doing some debugging in the wordpress core, I have observed that the product updating process remains blocked in the function wp_insert_post from wp-includes/post.php at line 3962 (do_action( 'wp_insert_post', $post_ID, $post, $update );)
How can I fix this issue? For which purposes is this line of code used?
I've observed that if this line of code is commented out, the updating process is working correctly.
I'm trying to obtain for products and products category the following permalinks structures: https://mm.mtgeeks/product-name.html https://mm.mtgeeks/parent-category-name.html https://mm.mtgeeks/parent-category-name/subcategory-name.html
In order to obtain this I have modified the permalink using the following filters and actions:
add_filter( 'request', 'change_requerst_vars_for_product_cat' );
add_filter( 'term_link', 'term_link_filter', 10, 3 );
add_filter( 'post_type_link', 'wpp_remove_slug', 10, 3 );
add_action( 'pre_get_posts', 'wpp_change_request' );
add_action( 'create_term', 'mee_new_product_cat_edit_success', 10, 2 );//fix 404 errors
add_action('init', 'mee_product_category_rewrite_rules');
add_action('wp_insert_post', 'mt_woo_new_product_post_save');//fix 404 errors
add_action('init', 'mt_woo_product_rewrite_rules');
After updating the permalinks from the wordpress admin, on the frontend I obtain the needed permalinks structure, but on the backend I have only one issue.
When trying to do modifications to products I get the following message displayed by google chrome: "This page isn’t working mm.mtgeeks is currently unable to handle this request. HTTP ERROR 500"
After doing some debugging in the wordpress core, I have observed that the product updating process remains blocked in the function wp_insert_post from wp-includes/post.php at line 3962 (do_action( 'wp_insert_post', $post_ID, $post, $update );)
How can I fix this issue? For which purposes is this line of code used?
I've observed that if this line of code is commented out, the updating process is working correctly.
Share Improve this question edited Mar 25, 2019 at 11:47 mrben522 1,6931 gold badge12 silver badges17 bronze badges asked Mar 24, 2019 at 20:38 MikaDevMikaDev 12 bronze badges1 Answer
Reset to default 0Hmm, I would use the Permalink Manager Lite plugin (free). or it's PRO version ($39): https://permalinkmanager.pro/ Makes life easier :)
本文标签: Issue with wpinsertpost when modifying permalinks with “html” extension
版权声明:本文标题:Issue with wp_insert_post when modifying permalinks with “.html” extension 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745504839a2153558.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论