Problem with rewrite with front after update from 0.8.5 to 1.0.5
-
Hi,
After updating from 0.8.5 to 1.0.5, I faced an issue regarding rewrite with front parameter. Indeed, when I check the new option “cptui_post_types” where the settings were migrated to I see that:
s : 7 : "rewrite"; s : 1 : "1"; s : 12 : "rewrite_slug"; s : 10 : "formations"; s : 17 : "rewrite_withfront"; s : 1 : "0";
Then I looked to the code and found the problem at line 168 of /custom-post-type-ui/custom-post-type-ui.php :
$rewrite['with_front'] = ( ! empty( $post_type['rewrite_withfront'] ) && 'false' === disp_boolean( $post_type['rewrite_withfront'] ) ) ? false : true;
The problem is that
! empty( $post_type['rewrite_withfront'] )
will return false as empty function return true if string=”0″.
The problem only occurs for settings that were migrated as new created post type in 1.0.5 will be stored using boolean ‘false’ instead of ‘0’.
Best regards
- The topic ‘Problem with rewrite with front after update from 0.8.5 to 1.0.5’ is closed to new replies.