It removed all rewrite rules, making subpages return 404s. See my fix here: https://ww.wp.xz.cn/support/topic/45-fix?replies=1
I don’t know if this is the correct solution, but in case anyone stumbles across this and has the same problem, this is what I did to fix it.
add_filter( 'page_link', 'modify_item_page_permalink', 10, 3 );
function modify_item_page_permalink( $url, $pageid, $sample ) {
global $wp_query;
if ( get_the_ID() == $pageid ) {
if ( ! empty( $wp_query->query_vars['item_id'] ) ) {
$url .= $wp_query->query_vars['item_id'] . '/';
}
}
return $url;
}
The page_link action isn’t documented. Use post_link if you’re not using a page.
Checking to see if the $pageid == get_the_ID() is to prevent it from adding these querystrings onto navigation links.